【发布时间】:2011-09-20 08:38:28
【问题描述】:
如果你考虑:
class A : IInterface { }
在运行时:
A instance = new A();
instance.GetType(); // returns "A"
或
IInterface instance = new A();
instance.GetType(); // returns "A"
或
object instance = new A();
instance.GetType(); // returns "A"
问题:如何获取IInterface作为类型?
【问题讨论】:
标签: c# inheritance reflection interface types