You can, for example, call the constructor of the base class from the constructor of the child class as follows:
Readonly field and constructor in the base class:
public readonly int MyInt; protected TheBaseClass(int myInt) { this.MyInt = myInt; }
Constructors in a child class:
public TheChildClass() : base(42) { } public TheChildClass(int i) : base(i) { }
source share