我现在知道命名空间的全名,知道程序集的名字,怎么才能反射到这个命名空间下所有的类呢?
微信里点“发现”,扫一下
二维码便可将本文分享至朋友圈。
System.Reflection.Assembly ass = System.Reflection.Assembly.LoadFile("filePath");Type[] types = ass.GetTypes();foreach (Type type in types){ if (type.Namespace == "xxx") { //... }}