N
Nathan Bullock
Hi,
I have a base class, say Base and there are two classes, say Class1
and Class2 which are derived from Base. Is there any way for me, say
from a static method in Base, to get a list of all classes derived
from Base?
class abstract Base
{
static public ArrayList AllDerived()
{
// Here I want to return a list containing typeof(Class1) and
typeof(Class2)
}
}
class Class1 : Base
{
public Class1() {}
}
class Class2 : Base
{
public Class1() {}
}
Thank you.
Nathan Bullock
I have a base class, say Base and there are two classes, say Class1
and Class2 which are derived from Base. Is there any way for me, say
from a static method in Base, to get a list of all classes derived
from Base?
class abstract Base
{
static public ArrayList AllDerived()
{
// Here I want to return a list containing typeof(Class1) and
typeof(Class2)
}
}
class Class1 : Base
{
public Class1() {}
}
class Class2 : Base
{
public Class1() {}
}
Thank you.
Nathan Bullock