adspace


what is a static constructor?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Which namespaces are necessary to create a localized application?

1142


What is expression tree in c#?

998


What is an abstract class c#?

969


Why can't we use a static class instead of singleton?

954


How to assign Null value to Var?

1064


How do you inherit a class into other class in c#?

995