static Keyword in C-Sharp / C#

static members are items that are deemed (by the class designer) to be so commonplace that there is no need to create an instance of the class before invoking the member.
While any class can define static members, they are quite commonly found within “utility classes.”

By definition, a utility class is a class that does not maintain any object-level state and is not created with the new keyword. Rather, a utility class exposes all functionality as class-level (a.k.a., static) members.

the static keyword can be applied to the following:

Post a Comment