.net - Static and default constructor -


A non-static class can be static as well as the default constructor at the same time.

What is the difference between these two constructors? When I go to the stationary or static only with the default constructor?

Static Constructor Once Only AppDomain If you use the example of the first class, Can use to initialize.

On the other hand, the default constructor keeps running every time you create a new instance of the class. In the default constructor you can initialize the non-static field of the instance.


Comments