New to OOP and I\'m confused by how derived-class constructors work when inheriting from a base class in C#.
First the base class:
class BaseClass
{
If you want to initialize BaseString with default value, then pass that value to base class constructor (thus you don't have to pass that parameter to derived class constructor)
public SubClass(string SubString) : base(null)
Or define parameterless constructor in base class.
Also about parameter naming - it does not matter what name has parameter, which you are passing to derived constructor. The only thing which matter is a value you are passing to base constructor.
public SubClass(string AnotherString, string SubString) : base(AnotherString)