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

Update documents for field backed properties #43261

Merged
merged 12 commits into from
Nov 13, 2024

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented Oct 30, 2024

Fixes #42820
Fixes #43224

Update and add documents relevant to field backed properties.

Commit by commit summary:

  1. Add the field backed properties updates to property articles in the language reference: While doing this, update the relevant articles to lead with automatically implemented properties, followed by field backed, then expression bodied, and finally fully implemented property accessors.
  2. Found more instances of "autoimplemented": This time without the hyphen.
  3. Add discussion of field backed properties to all relevant programming guide and fundamentals articles.. Also, publish the feature spec for this preview feature.
  4. Finalize errors and warnings: This feature added a couple error messages.
  5. Consistent terminology: The other language docs use "compiler synthesized" instead of "compiler generated"

Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/core/whats-new/dotnet-9/overview.md What's new in .NET 9
docs/csharp/language-reference/attributes/general.md "Attributes interpreted by the compiler: Miscellaneous"
docs/csharp/language-reference/builtin-types/record.md Records (C# reference)
docs/csharp/language-reference/compiler-messages/partial-declarations.md Errors and warnings related to partial type and partial member declarations
docs/csharp/language-reference/keywords/field.md "The field contextual keyword"
docs/csharp/language-reference/keywords/get.md The get keyword
docs/csharp/language-reference/keywords/index.md C# Keywords
docs/csharp/language-reference/keywords/init.md "The init keyword - init only properties"
docs/csharp/language-reference/keywords/set.md The set keyword (C# Reference)
docs/csharp/language-reference/keywords/value.md docs/csharp/language-reference/keywords/value
docs/csharp/language-reference/toc.yml docs/csharp/language-reference/toc
docs/csharp/linq/get-started/walkthrough-writing-queries-linq.md Tutorial: Write queries in C# using language integrated query (LINQ)
docs/csharp/programming-guide/classes-and-structs/auto-implemented-properties.md Automatically implemented properties
docs/csharp/programming-guide/classes-and-structs/object-and-collection-initializers.md "Object and Collection Initializers"
docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md Partial Classes and Methods (C# Programming Guide)
docs/csharp/programming-guide/classes-and-structs/properties.md docs/csharp/programming-guide/classes-and-structs/properties
docs/csharp/programming-guide/classes-and-structs/restricting-accessor-accessibility.md Restricting Accessor Accessibility (C# Programming Guide)
docs/csharp/programming-guide/classes-and-structs/using-properties.md "Using Properties"
docs/csharp/specification/toc.yml docs/csharp/specification/toc
docs/csharp/whats-new/csharp-13.md What's new in C# 13

@dotnet-policy-service dotnet-policy-service bot added the 🏁 Release: .NET 9 Work items for the .NET 9 release label Oct 31, 2024
@BillWagner BillWagner marked this pull request as ready for review November 1, 2024 17:37
@BillWagner BillWagner requested a review from a team as a code owner November 1, 2024 17:37
@BillWagner
Copy link
Member Author

@IEvangelist @tdykstra

The work here is done. The snippets 5000 error is because the field preview feature isn't yet available in the .NET 9 SDK. It will be in the GA release. I'll wait until that goes live before merging.

BillWagner and others added 11 commits November 8, 2024 14:58
Add the field backed properties updates to property articles in the language reference.

While doing this, update the relevant articles to lead with automatically implemented properties, followed by field backed, then expression bodied, and finally fully implemented property accessors.
Replace "autoimplemented" with "automatically implemented"
The `field` backed property preview feature adds two new diagnostics.
Use the term "compiler synthesized" rather than "compiler generated" for the backing field in automatically implemented or field backed properties.
A couple warnings have been added regarding field backed properties.
@BillWagner BillWagner force-pushed the preview-field-backed-properties branch from 91f9fde to 101e574 Compare November 8, 2024 20:00
Add note on field backed properties for field backed properties.
@BillWagner BillWagner requested a review from gewarren as a code owner November 11, 2024 21:44
@BillWagner
Copy link
Member Author

.NET 9 is avaiable.

@BillWagner BillWagner closed this Nov 12, 2024
@BillWagner BillWagner reopened this Nov 12, 2024
@BillWagner BillWagner closed this Nov 12, 2024
@BillWagner BillWagner reopened this Nov 12, 2024
@BillWagner BillWagner closed this Nov 13, 2024
@BillWagner BillWagner reopened this Nov 13, 2024
@BillWagner BillWagner merged commit 8aeac83 into dotnet:main Nov 13, 2024
38 of 43 checks passed
@BillWagner BillWagner deleted the preview-field-backed-properties branch November 13, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

A few edit suggestions [C# 13]: New Feature - field backed properties (preview feature)
2 participants