A static class can be used as a container for collection of methods that are dependent on input parameters.
It has the following characteristics:
- Contains only static members.
- Cannot be instantiated.
- Is sealed.
- Cannot contain Instance Constructors.
The advantage of using a static class is that the compiler can check to make sure that no instance members are accidentally added. The compiler will guarantee that instances of this class cannot be created.
A singleton class is used when you need only one instance. A singleton class has a private constructor. A private constructor prevents the class from being instantiated again.
A singleton class can have instance members, while a static class cannot.