# Constructor

Special class code that initializes a new object.

## What is **Constructor** in C#?

**Constructor** — Special class code that initializes a new object.

```csharp
class Store
{
    static int locationCount = 3;
    const int maxItems = 100;
    readonly string name;

    Store(string name)
    {
        this.name = name;
    }
}
```

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary/subjects/c-sharp/journeyman)

Updated: September 27, 2026

## In other subjects

- [Constructor in Java](https://www.ask-codey.com/glossary/constructor)
- [Constructor in JavaScript](https://www.ask-codey.com/glossary/constructor-javascript)
- [Constructor in OOP](https://www.ask-codey.com/glossary/constructor-oop)

Source: https://www.ask-codey.com/glossary/constructor-c-sharp
