Wednesday, March 26, 2014

The static constructor loads or called only once when any method of static class is invoked or initialize. There is no need of explicit calling of static constructor. But when there is no static property or method to do so then we can have explicit option to call static constructor as given belowtypeof(StaticClassName).TypeInitializer.Invoke(null, null);