class a
{
a()
{
Type type = ...//子类的Type
}
}
class b: a
{
}
class demo()
{
static int Main()
{
}
}
-----------------------------------------
当然不能使用:
Type type = typeof(B);
因为我写a不知道会有b存在..
...全文
131321打赏收藏
如何从父类获取子类的类型Type
class a { a() { Type type = ...//子类的Type } } class b: a { } class demo() { static int Main() { } } ----------------------------------------- 当然不能使用: Type type = typeof(B); 因为我写a不知道会有b存在..