{"id":19135,"date":"2018-09-12T10:00:52","date_gmt":"2018-09-12T17:00:52","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/dotnet\/?p=19135"},"modified":"2020-10-05T19:33:17","modified_gmt":"2020-10-06T02:33:17","slug":"a-belated-welcome-to-c-7-3","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/a-belated-welcome-to-c-7-3\/","title":{"rendered":"A (Belated) Welcome to C# 7.3"},"content":{"rendered":"<h2>A (Belated) Welcome to C# 7.3<\/h2>\n<p>Better late than never! Some of you may have noticed that C# 7.3 already shipped, back in Visual Studio 2017 update 15.7. Some of you may even be using the features already.<\/p>\n<p>C# 7.3 is the newest point release in the 7.0 family and it continues themes of performance-focused safe code, as well as bringing some small &quot;quality of life&quot; improvements in both new and old features.<\/p>\n<p>For performance, we have a few features that improve <code>ref<\/code> variables, pointers, and stackalloc. <code>ref<\/code> variables can now be reassigned, letting you treat <code>ref<\/code> variables more like traditional variables. <code>stackalloc<\/code> now has an optional initializer syntax, letting you easily and safely initialize stack allocated buffers. For struct fixed-size buffers, you can now index into the buffer without using a pinning statement. And when you do need to pin, we&#8217;ve made the <code>fixed<\/code> statement more flexible by allowing it to operate on any type that has a suitable <code>GetPinnableReference<\/code> method.<\/p>\n<p>For feature improvements, we&#8217;ve removed some long time restrictions on constraints to <code>System.Enum<\/code>, <code>System.Delegate<\/code>, and we&#8217;ve added a new <code>unmanaged<\/code> constraint that allows you to take a pointer to a generic type parameter. We&#8217;ve also improved overload resolution (again!), allowed <code>out<\/code> and pattern variables in more places, enabled tuples to be compared using <code>==<\/code> and <code>!=<\/code>, and fixed the <code>[field: ]<\/code> attribute target for auto-implemented properties to target the property&#8217;s backing field.<\/p>\n<p>All of these features are small additions to the language, but they should make each of these parts of the language a little easier and more pleasant. If you want more details, you can see the 15.7 <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/releasenotes\/vs2017-relnotes-v15.7#csharp\">release notes<\/a> or check out the documentation for <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/whats-new\/csharp-7-3\">What&#8217;s new in C# 7.3<\/a>.<\/p>\n<p>Andy Gocke\nC#\/VB Compiler Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A (Belated) Welcome to C# 7.3 Better late than never! Some of you may have noticed that C# 7.3 already shipped, back in Visual Studio 2017 update 15.7. Some of you may even be using the features already. C# 7.3 is the newest point release in the 7.0 family and it continues themes of performance-focused [&hellip;]<\/p>\n","protected":false},"author":1379,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685],"tags":[],"class_list":["post-19135","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet"],"acf":[],"blog_post_summary":"<p>A (Belated) Welcome to C# 7.3 Better late than never! Some of you may have noticed that C# 7.3 already shipped, back in Visual Studio 2017 update 15.7. Some of you may even be using the features already. C# 7.3 is the newest point release in the 7.0 family and it continues themes of performance-focused [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/19135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/1379"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=19135"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/19135\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=19135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=19135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=19135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}