Static members in C#
The main purpose of using static classes is to provide blueprints of their inherited classes.
Advantages of static classes
- Every member of a static class must be static or else you’ll get an error.
- Static members can only be accessed by their class name.
- Static class members are accessed by the class name followed by the member name.
- The static keyword is used before the class keyword in a class definition to declare a static class.
credits:https://www.c-sharpcorner.com/UploadFile/74ce7b/static-class-in-C-Sharp/

Top comments (0)