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# 7.3: auto-implemented property field-targeted attributes #3962

Closed
BillWagner opened this issue Dec 15, 2017 · 3 comments
Closed

C# 7.3: auto-implemented property field-targeted attributes #3962

BillWagner opened this issue Dec 15, 2017 · 3 comments

Comments

@BillWagner
Copy link
Member

This feature would enable this syntax:

[field: SomeThingAboutFieldAttribute]
public int SomeProperty { get; set; }

The attribute SomeThingAboutFieldAttribute would be applied to the compiler generated backing field for SomeProperty

See dotnet/csharplang#42

This likely does not introduce any new articles. Instead, it will be looking at where we discuss Attributes and updates any locations where we say this isn't allowed.

@mairaw mairaw added this to the Backlog milestone Dec 18, 2017
@mairaw mairaw added the P1 label Feb 12, 2018
@BillWagner
Copy link
Member Author

BillWagner commented Mar 2, 2018

The following files will need to be updated for this feature:

  • docs/csharp/properties.md
  • docs/csharp/programming-guide/concepts/attributes/attributeusage.md
  • docs/csharp/programming-guide/concepts/attributes/index.md
  • docs/csharp/programming-guide/concepts/serialization/walkthrough-persisting-an-object-in-visual-studio.md
  • docs/csharp/programming-guide/concepts/serialization/index.md

@BillWagner
Copy link
Member Author

The updated proposal is here

@BillWagner
Copy link
Member Author

BillWagner commented Apr 30, 2018

This will get completed in Sprint 135.

Current status: All the files listed in the comment above have been reviewed, and updated. All the samples have been migrated to the Samples repo.

Remaining work:

  • Update properties discussion to include field based attributes on auto-implemented properties.
  • Update Serialization sample to include auto-implemented properties that aren't serialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants