When a property declaration includes a static
modifier, the property is said to be a static property. When no static
modifier is present, the property is said to be an instance property.
A static property is not associated with a specific instance, and it is an error to refer to this
in the accessors of a static property. It is furthermore an error to include a virtual
, abstract
, or override
modifier on an accessor of a static property.
An instance property is associated with a given instance of a class, and this instance can be accessed as this
(§7.5.7) in the accessors of the property.
When a property is referenced in a member-access (§7.5.4) of the form E.M
, if M
is a static property, E
must denote a type, and if M
is an instance property, E must denote an instance.
The differences between static and instance members are further discussed in §10.2.5.