TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

C# 11 Preview Updates – Raw string literals, UTF-8 and more

125 点作者 philonoist大约 3 年前

11 条评论

mikece大约 3 年前
I have been working with .NET since the heady, early days when the web framework was being called ASP-NG (next gen) and C# had not yet been given it's official name. I've written millions of lines of C# but sometimes I think it would behoove me to start over with C# as though I had never seen it before because there are things that have been added to the language in the last few years that I had no clue were there. Is there a course or book or blog post series along the lines of "C# for people who are writing C# like it's 2010"?
评论 #31467420 未加载
评论 #31467467 未加载
评论 #31468526 未加载
评论 #31470080 未加载
评论 #31467535 未加载
评论 #31467425 未加载
sandreas大约 3 年前
I recently wrote a little cross platform command line app to tag my audio files [1] with C# (dotnet 6) and I must say: This language is awesome on macOS, Linux AND windows. I personally use Rider as IDE and it feels pretty natural.<p>The new features will make my C# life even easier.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;sandreas&#x2F;tone" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sandreas&#x2F;tone</a>
wpdev_63大约 3 年前
Found out the other day the nintendo switch emulator ryujinx is written in C#. It&#x27;s the first I&#x27;ve heard of a performant emulator written with a gc language and it&#x27;s amazing. It&#x27;s as fast as its competitor written C++ which goes to show that C# can be just as fast as language without a runtime with minimal gc pauses.
评论 #31469211 未加载
评论 #31471275 未加载
oaiey大约 3 年前
I really like the removal of the !! operator from being included in the language. The syntax was awkward and the introduction of branching&#x2F;exceptions into parameter spec felt wrong.
评论 #31466654 未加载
thatisit大约 3 年前
Awesome. Our company is considering moving scientific applications from Python to .NET (C# or F#), mostly for stability reasons and better backwards compatibility.<p>We need to wrap C libraries though. Does anyone have experience with or reliable benchmarks for the C interface?
评论 #31468322 未加载
评论 #31467088 未加载
评论 #31467637 未加载
pelagicAustral大约 3 年前
I just turn my head to look at my bookshelf, and sure enough, there it is, my C# 6.0 &amp; .NET Framework 4.6 book. That was the last version I worked.<p>Nice to read about all the changes in C#, I&#x27;ve been thinking a lot about going back to .NET, but at this point I would probably need some training. There are things like Blazor or .NET Core that I&#x27;m absolutely unfamiliar with.<p>I kind of miss Visual Studio for some reason, after what feels like a lifetime of web development in other open source tech stacks.
评论 #31466919 未加载
评论 #31466903 未加载
评论 #31466980 未加载
评论 #31466894 未加载
评论 #31466748 未加载
评论 #31466901 未加载
评论 #31467409 未加载
评论 #31467121 未加载
评论 #31466686 未加载
jnash大约 3 年前
Why oh why does C# still not have sum types? It is by far the most useful feature still missing from C# and one of the key reasons why I prefer F# over C#.
yesiknowitbettr大约 3 年前
Useless features. What C# really needs is the following:<p>- Discriminated unions<p>- Switch expressions as standalone statements<p>- Type providers, so it will verify the content of the text, provide syntax highlight, autocomplete, etc for many languages and data structures:<p>var sql = &lt;SQL&gt;&quot;&quot;&quot;<p><pre><code> SELECT Id, Name FROM Users </code></pre> &quot;&quot;&quot;<p>- Pipe operator to avoid nested method calls (similar to F#)
评论 #31476432 未加载
thrower123大约 3 年前
Did I miss something in the Framework -&gt; Core transition where strings aren&#x27;t UTF-16 internally anymore?
评论 #31467207 未加载
评论 #31467159 未加载
评论 #31466843 未加载
yyyk大约 3 年前
I like C#, but the language authors have a tendency to overcomplicate with unintuitive semantics like significant spaces at the closing of the raw string literal (otherwise a very welcome feature) or struct vs record struct etc.
评论 #31469115 未加载
oaiey大约 3 年前
I appreciate the inclusion of raw strings. Together with the work on interpolated strings api in previous language &#x2F; base class library, there might be some nice innovations in the templating corner coming to C#.