I used the Singleton classes and the static method for a while and always wondered how nice it would be to have a separate type, which is a static type and cannot be created, but only has static methods!
It will be easy to read and also support.
for ex
public UtilType MyUtility
{
public void Calculate(int x,int y)
{
return x+y;
}
}
It MyUtilityshould not be stated here that only its methods can be accessed in a static way.
source
share