---
title: "Constructor in C#"  
description: "Constructor is like a method."  
author: "umesh Sharma"  
published: 2014-06-28  
updated: 2020-07-11  
canonical: https://www.mindstick.com/articles/1447/constructor-in-c-sharp  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Constructor in C#

Constructor is like a method.\

1. Constructor has the same name as a [class name](https://www.mindstick.com/forum/12871/how-to-get-class-name).

2. Constructor doesn’t have any return type.

3. Constructor didn’t call by programmer it is called [automatic](https://answers.mindstick.com/qa/45147/what-is-the-rule-relating-to-automatic-suspension-of-a-member) whenever class

object is created.

```
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace ConsoleApplication4{    class Program    {        public static void Main(string[] args)        {            ABC OBJ = new ABC();         }    }     class ABC    {        public ABC()        {            Console.WriteLine("Constructor Called");        }    }}
```

---

Original Source: https://www.mindstick.com/articles/1447/constructor-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
