Static class:
Adding a static decoration to the class (classes) indicates that the class cannot be instantiated, and that a variable or function cannot be instantiated in that class.
Then if you want to add functions, variables, and properties to this static class, you must be static.
Key features of static classes:
1: Contains only static members.
2: Cannot instantiate.
3: The nature of the static class is an abstract sealed class, so it cannot be inherited, nor can it be instantiated.
4: Cannot contain instance constructors.
5: If all the members under a class need to be shared, then the class can be defined as a static class.
If your method or object is static, which means that static is a global variable, the direct class name + method name is referenced
static void Main (string[] args) { a.fun (); } public static class A {public static void Fun () { } }
C # static class static and non-static methods comparison