所以,如果我有一个实例
System.Reflection.Assembly
Run Code Online (Sandbox Code Playgroud)
我有以下型号:
class Person {}
class Student : Person {}
class Freshman : Student {}
class Employee : Person {}
class PersonList : ArrayList {}
class StudentList : PersonList {}
Run Code Online (Sandbox Code Playgroud)
如何枚举程序集的类型以仅获取对Person和PersonList类型的引用?
要明确:我不希望在此查找期间显式指定Person或PersonList类型.Person和PersonList只是本例中有问题的程序集中定义的根类型.我正在寻找一种枚举给定程序集的所有根类型的通用方法.
谢谢你的时间:)