static Summary The static modifier is used to declare a member as belonging to a class itself rather than its instances. Syntax static member Parameters member The member to make 'static'. Description The static modifier is used to declare a member as belonging to a class itself rather than its instances. Thus, a static class member can be accessed without an instance of the class. Module members are implicitly static so there is no need to declare them as such. Examples Static Field 1234class Foo{ static int bar = 1;} Static Method 1234567class Foo{ static int bar() { return 1; }} Nested Class 123456class Foo{ static class Bar { }} See Also class Share HTML | BBCode | Direct Link