G
Guest
The code below is pretty simple. Calling Talker() in the parent returns
"Parent", and calling Talker() in the child returns "Child".
I'm wondering how I can modify the code so that a call to the Talker() in
Parent will call the Talker() method in every child class. The kicker is that
I have many different Child classes, and not all Child classes will be loaded
when Talker() in the Parent is called.
Thanks,
Randy
class Parent
{
public virtual string Talker()
{
return "Parent";
}
}
class Child : Parent
{
public override string Talker()
{
return "Child";
}
}
"Parent", and calling Talker() in the child returns "Child".
I'm wondering how I can modify the code so that a call to the Talker() in
Parent will call the Talker() method in every child class. The kicker is that
I have many different Child classes, and not all Child classes will be loaded
when Talker() in the Parent is called.
Thanks,
Randy
class Parent
{
public virtual string Talker()
{
return "Parent";
}
}
class Child : Parent
{
public override string Talker()
{
return "Child";
}
}