See
here[
^]
Use the static modifier to declare a static member, which belongs to the type itself rather than to a specific object.
When a member of a class is static you can see it as a member that belongs to the "object template". A class can be seen as an object template, able to create many objects of a certain type all with the same properties (but different values for each property)
eg.
class MyObjectTemplate{
public static string MystaticMember = "Static value, belonging to the class, not the instance of a class";
public string MyUsualMember = "Normal value, belonging to the instance of the class";
}
class TestStatic{
public static void Main(){
MyObjectTemplate obj1 = new MyObjectTemplate();
MyObjectTemplate obj2 = new MyObjectTemplate();
obj2.MyUsualMember = "new value for obj1";
MyObjectTemplate.MystaticMember = "change this";
}
}
Only use static when it makes absolute sense. Since you cannot call object members from static members (unless you create one in the static method eg) you end up in creating everything static before you know it and that goes against Object Oriented principles.
try to find some examples and make some yourself. Correct usage can help you a lot, incorrect usage can drown your application into a useless pile of rubbish.
Hope this helps.