Tag Archives: initializing constructors

Make an initializing constructor for a child class in C#

An initializing constructor is a constructor that takes parameters to make it easy to initialize an object’s properties. This example shows how to reuse a class’s initializing constructor for a child class. The following Person class has an initializing constructor. … Continue reading

Posted in classes, OOP | Tagged , , , , , , , , , , , , , , | Leave a comment

Give classes auto implemented properties and initializing constructors in C#

Giving Classes Auto Implemented Properties Typically classes implement a public property with a private variable known as the property’s “backing field” or “backing store.” You then use property procedures to give the program access to the private variable. For example, … Continue reading

Posted in classes, OOP | Tagged , , , , , , , , , , | Leave a comment