Static class is created once the assembly containing the class is loaded in
appdomain and remains loaded till app domain is unloaded so static
constructor will just be callled once.
First ..You can't create object of static class.
Second...If class is not static but contains static members and static
constructor then static contructor will be called just once when class comes
into scope while instance contructor will be called each time a new object
is created

On Fri, Dec 10, 2010 at 1:56 AM, Valery Martsinchyk <[email protected]>wrote:

> I want to create public class. Method of this class can be called
> without creating the object of that class.Also I want initialize some
> fields. I am doing it in the static constractor.I want to know if this
> initialization is performed just once and why? Does this means that
> object of this class is not recreated and constractor is not called
> every time I am calling methods of that public class.

Reply via email to