what is a static constructor?



what is a static constructor?..

Answer / Vicky Sharma

A static constructor in C# is a special method that initializes shared data for a class. Unlike other constructors, it cannot take parameters and cannot be overloaded or invoked directly. A static constructor runs automatically when the class is first accessed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Why is c# a good programming language?

1 Answers  


What are the features of c#?

1 Answers  


What is the difference between ienumerable and enumerator?

1 Answers  


What is Signature and parameter in overloading ?

3 Answers  


use of operator overloading of implicit & explicit operators?

1 Answers   TCS,


Different between method overriding and method overloading?

1 Answers  


What is the use of return in c#?

1 Answers  


What are the desktop applications?

1 Answers  


Is it possible to have a static indexer in c#? Allowed in c#.

1 Answers  


is it possible to inherit a class but methods declared in the class should not be inheritable i possible how?

8 Answers   Microsoft,


What are the variables in c#?

1 Answers  


What is the difference between list and arraylist c#?

1 Answers  


Categories