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
Project Description: We have a reconciliation tool, written in VB.Net that selects customer data (email, addresses, etc) from three different data sources and compares them with

What is shadowing? When 2 elements in a program have similar name, one of them can hide and shadow the one. Therefore in such cases the element which shadowed the main element

Web Based Inventory Management System Project Description: I need a build in software which has the subsequent features, if anybody has ready to use web based application, pl

How to use datagrid view

Program for Solution of Linear Equations - C# Program Hello, I've been trying so many codes for this but those codes didn't work well. Please write a Program for solving Linea

I am looking for learning management software (LMS) preferably in ASP.NET and Microsoft SQL/ MYSQL server as the database. The broad scope of the system could be 1. User managem

If client side validation is enabled in your Web page, does that mean server side code is not run Whenever the client side validation is enabled server emit's JavaScript code f

I need Job Posting Software for Schools Project Description: I want to create a software program that will automatically post a job to multiple schools. Let me know if you

What is a host process? A host process is an implementable program that hosts a workflow. It might be a Windows Forms application, a Web application, or a Web service applicati