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 is lazy initialization? Lazy initialization is a process by which an object is not initialized until it is first called in your code. The .NET 4.0 introduces a new wrapper

Project Description: The website should be CMS based; coding done only on ASP, MySql databases, .net script, aspx and java use with least of the flash work. We will be sharing j

What do you mean by data encapsulation? Data encapsulation is a method of binding data and code in single unit known as object and hiding all the implementation details of a cl

I want C# routines for website back end Project Description: We want some routines written in C# (.NET) to: * Parse some RESTful APIs to transform and push data to RabbitM

Write the basic steps to execute a LINQ query. The following are the three basic steps to execute a LINQ query:     Obtain the data source (The data source can be either an

What is three tier architecture? The 3 tier software architecture was comes into action in the 1990s to overcome the limitations of the 2 tier architecture. There are 3 laye

Finding the frequencies - C# Program: Please let me know how to find Frequencies in C#.

HWID Spoofed for Windows 7, 8 x64 Project Description: I require a simple program that will spoof my hardware id. I could be able to write the id to spoof to in the program a

I need Online Slot Video Game For A Facebook Project Description: Prepare an online slot video game for a Face book promotion in order to attract new visits and Increase the

Need code for Windows 8 and Windows Phone 8 that will http post images to a php file on web server. Project Description: I am working on two projects on both Windows 8/RT and