How do I call a parameterized constructor from another class in C#?

To call one constructor from another within the same class (for the same object instance), C# uses a colon followed by the this keyword, followed by the parameter list on the callee constructor’s declaration . In this case, the constructor that takes all three parameters calls the constructor that takes two parameters.

Sizin İçin Seçtik  Hangi ülkeye gidip çalışabilirim?

Leave a Reply

Your email address will not be published. Required fields are marked *