If the base class and derived class both have their constructors with parameters then where we pass the parameters to the base class constructors?
Like this:
public class DerivedClass : BaseClass
{
public DerivedClass(int derivedParam, String baseParam):base(baseParam)
{
}
}
The base
keyword here calls the base class constructor that matches the provided parameter overload.