循环遍历程序集的最佳方法是什么,并且对于程序集列表中的每个类来说,它都是“SuperClass”?
最佳答案
foreach(Type type in assembly.GetTypes()) {
var isChild = type.IsSubclassOf(typeof(parentClass))
}
引用MSDN .
关于c# - .NET/C# - 反射帮助 - 程序集中的类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1103759/