A static constructor has a similar function as a normal constructor i.e. it is automatically called the first time a class is loaded. The differences between a conventional constructor are that it cannot be overloaded, cannot have any parameters nor have any access modifiers and must be preceded by the keyword static. In addition, a class with a static constructor may only overloaded static constructor.
What is static constructor in c#?
Labels:
C-Sharp
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment