110,533
社区成员
发帖
与我相关
我的任务
分享
指定实例化类:
Common com = new Common();
Type type = com.GetType();
var baseType =type.BaseType;
var baseInterface= type.GetInterfaces();
Type type=typeof(classObject);
Type[] typeInterface =type.GetInterfaces();
if (typeInterface.Length != 0)
{
//通过接口的名称你可以确定是否想要的接口,并调用InvokeMember调用其成员
}