三
首先自己定義一個范型類
namespace RefTest
{
public class BaseClass<T
{
T t;
V v;
O o;
public void SetValue(T pt
{
this
this
this
}
public override string ToString()
{
return string
}
}
}
使用反射創建類型和調用方法
string tBaseClassStr =
[System
Type tBaseClass = Type
Object oBaseClass = Activator
MethodInfo addMBaseClass = tBaseClass
addMBaseClass
Console
System
測試成功
[
From:http://tw.wingwit.com/Article/program/net/201311/15106.html