Public API design for readonly properties and events in C# #34213
Labels
Area-Compilers
Bug
Concept-API
This issue involves adding, removing, clarification, or modification of an API.
Milestone
There's a bit of public API that should be added to symbols for the readonly members feature.
So far the following API has been added to
MethodSymbol
(handwaving a bit):It's also possible for properties or property accessors to have
readonly
modifiers.If users of the compiler APIs want to know if a property was declared readonly, or just its accessor, it could be necessary to add new methods to
IPropertySymbol
. The trouble is thatReadOnly
properties already have a meaning in VB and in the existing property APIs: it means there is no set accessor.This means that just copying the APIs from MethodSymbol to PropertySymbol is likely to cause confusion. We need a path forward where users can determine these facts about C# properties without causing confusion about VB properties or confusion with the existing API.
The text was updated successfully, but these errors were encountered: