C# Static Class:
A C# static class cannot be instantiated. In other words, you cannot use the new keyword to create a variable of the class type. Because there is no instance variable, you access the members of a static class by using the class name itself.
A Static Class is one which cannot be instantiated. The keyword new cannot be used with static classes as members of such class can be called directly by using the class name itself.
Following are the main characteristics of a static class:-
• A Static Class can only have static members.
• A Static Class cannot be instantiated.
• A Static Class is sealed, so cannot be inherited.
• A Static Class cannot have a constructor (except static constructor).
Static Class is denoted by the keyword static.
static void Main(string args)
int result = MyClass.addNumbers(20, 30);
Console.WriteLine("Addition=" + result);
public static class MyClass
public static int addNumbers(int a, int b)
return (a + b);