[C# 13]: New Feature - field
backed properties (preview feature)
#42820
Labels
🏁 Release: .NET 9
Work items for the .NET 9 release
dotnet-csharp/svc
in-pr
This issue will be closed (fixed) by an active pull request.
📌 seQUESTered
Identifies that an issue has been imported into Quest.
whats-new/subsvc
Visual Studio release
Other (please put exact version in description textbox)
Link to speclet
Link to Pull request
New behavior
Added in VS 17.12p3
Extend all properties to allow them to reference an automatically generated backing field using the new contextual keyword
field
. Properties may now also contain an accessor without a body alongside an accessor with a body.Areas affected
Language reference tasks
Property syntax changes. This smooths the migration from auto implemented properties to properties where a field is hand-written.
It's especially useful for default implementations in interfaces, and partial properties.
Note that this is a preview feature, so when the first .NET 10 / C# 14 preview comes out, this content should reflect that.
Tutorial tasks
It's worth updating property tutorials to discuss the "grow up" and migration story from auto properties to field backed properties to fully bespoke properties.
Everyday C# tasks
The grow up story should be discussed here as well.
Associated WorkItem - 321201
The text was updated successfully, but these errors were encountered: