C# Class Static and Instance Member


Members of a class like fields, methods, properties, events, can be a static member or instant member. Static members are usually considered as if they belong to the class. Instance members are considered as belong to objects of the class.

The static members have only one storage location. Even if the class is instantiated multiple times, there is only one copy of the static field.

When a member of a class like a field , method, property, event, indexer, constructor is not declare with a static modifier, the member is said to be an instance member.

Example static member

x = 1, y = 1
__

Example Instance member

x = 1, y = 1
__