---
title: "What is a static constructor?"  
description: "What is a static constructor?"  
author: "Sumit Kesarwani"  
published: 2014-09-04  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/2138/what-is-a-static-constructor  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# 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 first instance is created.

## The static constructor has the following features:

No access specifier is required to define it.

You cannot pass parameters in static constructor.

A class can have only one static constructor.

It can access only static members of the class.

It is invoked only once, when the program execution begins.

## Answers

### Answer by Sumit Kesarwani

Static constructors are introduced with C# to initialize the static data of a class. CLR calls the static constructor before the first instance is created.

## The static constructor has the following features:

No access specifier is required to define it.

You cannot pass parameters in static constructor.

A class can have only one static constructor.

It can access only static members of the class.

It is invoked only once, when the program execution begins.


---

Original Source: https://www.mindstick.com/interview/2138/what-is-a-static-constructor

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
