public class Test{
public void Export<T1, T2>()
{
}
public void ExportByClassName(string typename1,string typename2)
{
Type t1 = Type.GetType(typename1);
Type t2 = Type.GetType(typename2);
MethodInfo mi = this.GetType().GetMethod("Export").MakeGenericMethod(new Type[] { t1,t2});
mi.Invoke(this,null);
}
}
https://blog.csdn.net/fgfg12345/article/details/45098639
标签:传参,C#,GetType,t2,typename2,typename1,泛型,Type,public From: https://www.cnblogs.com/nuomibaibai/p/17477174.html