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
I need a Custom Report - Crystal Reports Project Description: I am seeking a custom report for our syrinx hire software, all reports are made from Crystal Reports. Skills

The ADO.NET gives the SqlCommand object which gives the functionality of executing the stored procedures. CREATE PROCEDURE SelectByEmployee @FirstName nvarchar(200) AS Se

What are characteristic's of Object Oriented System's? The characteristics of Object Oriented System's are as follows: 1)    Abstraction: The Abstraction allows the comple

What is the difference amonga system workflow and a human workflow? A system workflow is a workflow that is developed to automate interactions between applications. Such workfl

How do we assign page specific attributes? The Page attributes are specified by using the @Page directive.

What are the modes of storing ASP.NET session? 1) InProc: - In InProc mode Session state is stored in the memory space of the Aspnet_wp.exe process. That is the default setti

Consumer and Dealer management Project Description: Need to code the existing UI for relative and CRUD automation. Prepare CRUD for almost 7-10 forms with search and repor

NopCommerce v3.10 - Content Page Creation, Product Import and Site Customization Project Description: I have an existing website with about 800 products and we could like to

What are the components of WF 4.0? WF having of various components that work together to make desired workflow. The components of WF are given as follows: Workflows and a

Describe the rules and regulations that must be followed whereas creating a well-formed XML document. The following are the rules and regulations that are essential to follow w