Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C# 13]: New Feature - field backed properties (preview feature) #42820

Closed
5 tasks done
BillWagner opened this issue Oct 3, 2024 · 0 comments · Fixed by #43261
Closed
5 tasks done

[C# 13]: New Feature - field backed properties (preview feature) #42820

BillWagner opened this issue Oct 3, 2024 · 0 comments · Fixed by #43261
Assignees
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

Comments

@BillWagner
Copy link
Member

BillWagner commented Oct 3, 2024

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

  • Add to What's new in C# 13: Add links to updated docs in the What's new in C# 13 article.
  • Update language reference: Detail the areas in the language reference that will be updated for this feature.
  • Update compiler messages: Add new (or updated) pages for new compiler messages. Include related message.
  • Include in Everyday C# section*: Is this new feature included in Everyday C#?
  • Tutorials: Are new tutorials required for this feature? If so, detail below

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

@BillWagner BillWagner self-assigned this Oct 3, 2024
@dotnetrepoman dotnetrepoman bot added ⌚ Not Triaged Not triaged labels Oct 3, 2024
@BillWagner BillWagner moved this from Backlog to Ready in dotnet/docs .NET 9 documentation plan Oct 4, 2024
@BillWagner BillWagner added doc-enhancement 🗺️ reQUEST Triggers an issue to be imported into Quest. and removed ⌚ Not Triaged Not triaged labels Oct 4, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Oct 5, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Oct 31, 2024
@dotnetrepoman dotnetrepoman bot added 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. and removed 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. labels Nov 1, 2024
@BillWagner BillWagner moved this from 🔖 Ready to 👀 In review in dotnet/docs November 2024 sprint Nov 1, 2024
@dotnetrepoman dotnetrepoman bot added 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. and removed 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. labels Nov 1, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in dotnet/docs November 2024 sprint Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: ✅ Done
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

1 participant