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 float in unity?

0 Answers  


difference between managed code and unmanaged code ?

3 Answers  


If you define integer variable and a object variable and a structure then how those will be plotted in memory ?

1 Answers  


What is parallel foreach in c#?

0 Answers  


Which one is trusted and which one is untrusted?

0 Answers  


What is Implicit conversion in C#?

0 Answers  


Can we throw exception from catch block

6 Answers   Microsoft,


What is equal c#?

0 Answers  


What exactly is serverless?

0 Answers  


Can you prevent your class from being inherited and becoming a base class for some other classes?

5 Answers  


I want to print "Hello" even before main() is executed. How will you achieve that?

0 Answers   DELL,


Why do we use Design Pattern?

1 Answers   Impetus,


Categories