Hi @Mikhail ,
You can refer to Constructors (C# programming guide) for more information.
And here are some characteristics of the constructor.
- A constructor is a special method whose name is the same as the name of its type. Its method signature includes only the method name and its parameter list; it does not include a return type.
- The constructor is used to initialize the members of the object, and can complete some work while creating an object. When using new() to create a new object, the system will automatically call the constructor of the class.
- When no construction method is written in a class, the system will automatically generate a construction method without parameters when compiling, but if you write a construction method yourself, the system will not automatically generate it again.
Best Regards.
Jiachen Li
----------
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.