dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.17k stars 5.83k forks source link

Explain access modifiers on auto-implement properties #27248

Closed JamesC01 closed 1 year ago

JamesC01 commented 2 years ago

The page talks about auto-implement properties, but doesn't really explain why they'd be useful. I think it should show use of {get; private set;} to show a benefit of auto-implement properties over simple public fields.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

BillWagner commented 2 years ago

Thanks @JamesC01

We're looking at doing significant work in the C# programming guide over the next six months. This is one of the areas where we want to improve.