1
Static and instance methodsWhen a method declaration includes a static
modifier, the method is said to be a static method. When no static
modifier is present, the method is said to be an instance method.
A static method does not operate on a specific instance, and it is an error to refer to this
in a static method. It is furthermore an error to include a virtual
, abstract
, or override
modifier on a static method.
An instance method operates on a given instance of a class, and this instance can be accessed as this
(§7.5.7).
The differences between static and instance members are further discussed in §10.2.5.