ECMA-334 C# Language Specification

20.2.2: Interface properties

Interface properties are declared using interface-property-declarations:

interface-property-declaration
attributesoptnew opt type identifier { interface-accessors }
interface-accessors
attributesopt get ;
attributesopt set ;
attributesopt get ; attributesopt set ;
attributesopt set ; attributesopt get ;

The attributes, type, and identifier of an interface property declaration have the same meaning as those of a property declaration in a class (17.6).

The accessors of an interface property declaration correspond to the accessors of a class property declaration (17.6.2), except that the accessor body must always be a semicolon. Thus, the accessors simply indicate whether the property is read-write, read-only, or write-only.