When static constructor is invoked?

Answer Posted / abhay k pandey

Static constructors can invoke mainly at two ocasions
1. Just before the first instance of the class is created [
in case this static contructor is there in non static class]
2. At the time any static member is accessed [ in case of
either static or non static classes ]

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c# front end or back end?

696


What is the difference between ienumerable and enumerable?

694


What is an arraylist in c#?

813


without modifying source code if we compile again, will it be generated MSIL again?

706


what is a static constructor?

885


What is func c#?

776


Why main method is static in c#?

699


List some of the basic string operation?

714


List down the commonly used types of exceptions in .net

674


Is array a collection c#?

712


Why is xml called extensible?

680


What are reflections in c#?

701


When can a derived class override a base class member?

702


Describe ways of cleaning up objects in c#.

692


Is there throws keyword in c#?

682