What is a static constructor, DOT NET Programming

What is a static constructor?

Static constructors are introduced with C# to initialize the static data of a class. CLR calls the static constructor before the initial instance is formed.

The static constructor has the subsequent features:

    No access specifier is needed to define it.

    You cannot pass parameters in static constructor.

    A class can have only single static constructor.

    It can access only static members of the class.

    It is requested only once, when the program execution starts.

 

Posted Date: 7/3/2013 9:00:52 AM | Location : United States







Related Discussions:- What is a static constructor, Assignment Help, Ask Question on What is a static constructor, Get Answer, Expert's Help, What is a static constructor Discussions

Write discussion on What is a static constructor
Your posts are moderated
Related Questions
What are the metrics followed in project management? The most metric sets deal with a variation of these attributes and are chosen to help the project managers gain insight int

Project Description: I am having a table available in excel format and features the subsequent: - It has about 170000 rows - Some text is longer than 255 in length. - S

Can you give a practical implementation of FAÇADE patterns? The Façade pattern sits on the top of lot of the subsystems & makes access easy to interfaces of these subsystems. T

What are the problems that can occur if you do not implement locking properly in SQL SERVER? The problems that occur if you do not implement locking properly in SQL SERVER is a

Project Description: We have a web based program prepared with .NET C# and Microsoft SQL Server. There are some reports needs to be created. Required Skills. - High Pro

Describe the various components in sequence diagrams. Object lifeline: - It shows the lifetime of an object creation and its destruction. If the object is created or des

What does Address Of operator do? The Address Of operator generates a delegate object for the BackgroundProcess method. A delegate within VB.NET is a object-oriented, type-safe

How we get the current culture of the environment in windows and ASP.NET? The "CultureInfo.CurrentCulture" represents the current culture of the environment. For illustrate if


Develop Outlook Add-In for all versions I need simple code for Outlook(express,2003,2007,2010,2013) Add-In with functionality to repeatedly send CC to the specified email(s), th