Add a PrimaryAttribute type #28200
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.Runtime
backlog-cleanup-candidate
An inactive issue that has been marked for automated closure.
no-recent-activity
Milestone
Split from #20008
For the
Enum
methodGetName
when there are multiple enum members with the same value the name it returns is undefined. I propose adding aPrimaryAttribute
to be applied to enum members where there is ambiguity which will ensure its name is returned.Proposed API
API Details
PrimaryAttribute
is used to specify what enum member to retrieve when there are multiple enum members with the same value. It could be used for more than just enum members for cases in code where there is ambiguity.The text was updated successfully, but these errors were encountered: