Hidden things about Constructor in C#
What's constructor? It's a special method used to initialize an object or struct, limit access to object or control object or structs by set default values, In brief it's like the key to the door, let's say you want to run your car what do you need to do this? of sure you need the Key to run, so the Constructor in this case to run function of the Car has a Parameter called Key, without the Key you cannot run public class Car { string _key; public Car(string key){ // the constructor, accepts string key as parameter _key=key; } } Parameterless constructors: If you didn't create any constructors in your class, then C# creates the default P arameterless Constructor that initialize C# types default values, and the same on Structs, and if you have Static Fields then C# by default creates Static Constructor to initialize those Fields into default value ...