Non-static classes can be instantiated, but static classes cannot be instantiated, that is, you cannot use the new keyword to create variables of class type.
Non-static classes can have instance methods and static methods.
Use the class name itself to access members of a static class, and static classes are sealed.
Non-static class example -
public class Calculate
Static class example -
public static class Calculate
The above is the detailed content of What are non-static classes in C#?. For more information, please follow other related articles on the PHP Chinese website!