Vulpes
posted
5113 posts
since
Feb 28, 2011
from
|
|
Re: Global constructor
|
|
|
|
|
|
|
|
|
|
|
There's no such thing as a global constructor in C#.
It's possible for a class or struct to contain instance constructor(s) and/or a static constructor.
A static constructor initializes static data for the class or struct as a whole, is called at most once by the system and is guaranteed to run before any instance of that class or struct is created.
|
|
|
|
|
|
Deepak Dwij
posted
145 posts
since
Oct 17, 2011
from
Delhi NCR
|
|
Re: Global constructor
|
|
|
|
|
|
|
|
|
|
|
this one is not clear to me . but Thanks vulpes
|
|
|
|
|
|
Sam Hobbs
posted
6447 posts
since
Sep 07, 2009
from
Los Angeles, California, USA
|
|
Re: Global constructor
|
|
|
|
|
|
|
|
|
|
|
Deepak, what do you mean by "global constructor"? Did you see the term used someplace? Or is there something you are trying to do that you need a global constructor?
|
|
|
|
|
Thinking is a feeling; pleasant for some and unpleasant for others.
|
|
|
|
|
|