0

Что такое конструктор и чем отличается от метода в C#? What is a constructor and how does it differ from a method in C#?

Ответе, пожалуйста, как можно простыми словами и очень подробно. Искал информацию в интеренете целых 2 часа, но понятного для себя объяснения не нашёл, так что буду благодарен. Please answer in as simple words as possible and in great detail. I searched for information on the Internet for 2 whole hours, but I did not find an explanation that I could understand, so I will be grateful.

12th Jul 2024, 6:37 PM
ВолКот
ВолКот - avatar
1 Odpowiedź
+ 1
I think it is a method, but it’s a method that is automatically called when you make an instance of the object. At least, that’s what it is in Python.
12th Jul 2024, 7:55 PM
Wilbur Jaywright
Wilbur Jaywright - avatar