Static member of a class is shared by all instances of the class.
A static field is not part of a specific instance; instead, it identifies
exactly one storage location. No matter how many instances of a class are
created, there is only ever one copy of a static field for the associated
application domain.
public string var1;
This decalration is an instance variable and
Instance variable can have different values for different objects.
An instance field belongs to an instance. Specifically, every instance of a
class contains a separate set of all the instance fields of that class.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.