All DotNet variables used in the previous recipe had to be instantiated before they could be used, which means that methods called on such variables are executed on a particular instance of that class. Static methods belong to the class itself and can be called without instantiating the variable.
The whole class can be declared as static. In this case, the class does not implement any constructor and all its methods have to be also static. An example of a static class is
File--a .NET class encapsulating file operations.
A non-static class can implement both instance and static methods.
RegEx is an example of a class that has both static and instance methods.
RegEx is a .NET implementation of regular expressions. ...