Class members can be either instance or static members. It is possible to think of static members as belonging to classes and instance members as belonging to objects (instances of classes).
When a field, method, property, event or constructor includes the Shared modifier, it is a static member. Constant declarations are implicitly static. Static members have the following characteristics:
When a static member M is used in the form E.M, E must be either a type containing M or an instance or object of a type containing M.
Regardless of the number of created class instances, there is only one static field copy.
A static member does not operate on a specific class instance. It is a compile error to use Self in such class members.
If a class member declaration does not contain the Shared modifier, it is an instance member. Instance members have the following characteristics:
When an instance member M is used in the form E.M, E must denote an instance (object) of a type containing M. It is a compile error for E to denote a type.
Every class instance contains a separate set of all instance fields of the class.
Instance members operate on a given instance of the class, which can be accessed using the Self structure.
See also: