F
Frank
Hello,
a question about abstract classes.
Abstract ClassA, inherited classes X and Y.
When creating it's something like:
if (true)
ClassX xx = new ClassX();
else
ClassY yy = new ClassY();
Is it in someway possible to put the if statement in the constructor of the
abstract ClassA? So I don't have to think about which inherited class to
create and leave the correct creation to ClassA?
Thanks in advance
Frank
a question about abstract classes.
Abstract ClassA, inherited classes X and Y.
When creating it's something like:
if (true)
ClassX xx = new ClassX();
else
ClassY yy = new ClassY();
Is it in someway possible to put the if statement in the constructor of the
abstract ClassA? So I don't have to think about which inherited class to
create and leave the correct creation to ClassA?
Thanks in advance
Frank