- Notifications
You must be signed in to change notification settings - Fork92
[Version 9.0] Feature support forinit accessors#1452
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:draft-v9
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Add support for init accessorsAdd support for init accessorsAdd support for init accessorsAdd support for init accessorsAdd support for init accessorsAdd support for init accessorsAdd support for init accessorsfix md formattingfix formatting, add xref linksadd xref links
Use different reasonable placeholders.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| > <tdrowspan="6">Propertyaccess</td> | ||
| > <td><code>P</code></td> | ||
| > <td>Thegetaccessoroftheproperty <code>P</code>inthecontainingclassorstructisinvoked.Acompile-timeerroroccursif <code>P</code>iswrite-only.If <code>P</code>isnot <code>static</code>,theinstanceexpressionis <code>this</code>.</td> | ||
| > <td>Thegetaccessoroftheproperty <code>P</code>inthecontainingclassorstructisinvoked.Acompile-timeerroroccursif <code>P</code>iswrite-onlyorinit-only.If <code>P</code>isnot <code>static</code>,theinstanceexpressionis <code>this</code>.</td> |
RexJaeschkeNov 7, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Should "containing class or struct" be extended to include interface? Here and a few other table rows below?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I made these tweaks after comparing the edits I researched 2+ years ago and what I found in this new feature branch.
init accessorsinit accessors
Uh oh!
There was an error while loading.Please reload this page.
This PR contains the work for
initaccessors in C# 9.The commits from#978 were squashed to one commit in this branch.
There are a number of comments that haven't been addressed on#978:
Notes:
initin it.