Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the use of the static constructor? When static
constructor gets compiled?



What is the use of the static constructor? When static constructor gets compiled?..

Answer / jitendra

Static constructor is used to initzialise the static data
members when the class has been instantiated first time.
Static data members can certainly be initialized at the
time of their declaration but there are times when value of
one static member may depend upon the value of another
static member. In such cases we definitely need some
mechanism to handle conditional initialization of static
members. To handle such situation, C# provides static
constructor.

Is This Answer Correct ?    20 Yes 2 No

Post New Answer

More C Sharp Interview Questions

What is difference between static and readonly in c#?

0 Answers  


Which are the access modifiers available in c#?

0 Answers  


What is Private Constructor? and it’s use? Can you create instance of a class which has Private Constructor?

0 Answers  


What is the use of console readline () in c#?

0 Answers  


Can we override interface method?

0 Answers  


How to find the current application file path while runtime?

0 Answers  


What is extension method in c sharp?

0 Answers  


If you define a user defined data type by using the struct keyword, is it a value type or reference type?

0 Answers  


If you donot specify an access modifier for a method, what is the default access modifier?

0 Answers  


What is the difference between dispose() and finalize() methods in c#?

0 Answers  


What is regex replace in c#?

0 Answers  


if you do have a stack overflow profile.what is your ranking?

0 Answers  


Categories