Skip to content

Inaccurate wording regards binding of properties (get vs set) #295

@ltcmelo

Description

@ltcmelo

This is a follow-up of a chat with @CyrusNajmabadi in Roslyn's Gitter. I was after an API to distinguishing the between the binding of a property's set or get underlying method, while I learned about this case.

class A { ref int Prop { get { ... } } }
...
a.Prop = 5

I suppose this makes the language spec inaccurate according to the statement below:

Except as the target of an assignment, when a property is referenced in an expression, the get accessor of the property is invoked to compute the value of the property

If this assumption is correct, please consider updating the spec with the detailed rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions