I have an abstract method in a base class declared like so…
public abstract void StartHere();
public virtual void StartHere(string flag)
{
switch(flag)
{
default : StartHere(); break;
}
}
Is there any way to change it so that the inheriting child class is forced to implement one or the other, but not both? Currently the child class is forced to implement only StartHere().
Also would you say its good practice to have the default virtual method point back to the parameterless abstract? or is this just pointless?
The function of this method is to setup the class, the programmer can either do a simple setup using StartHere() or a more complicated one taking in a flag StartHere(string).
Thank you!
Generally, it would be wise for the parameter less function to call the Para-metered function by passing the default values. This is called Function chaining.