对于运行时才能知道类型的数据实例化问题
1.实例化值类型:
Type t = Type.GetType(paramType);
TypeConverter tc = TypeDescriptor.GetConverter(t);
Object o = tc.ConvertFromString(“”);
2.实例化数组
Type t = Type.GetType(paramType);
Array array = Array.CreateInstance(t, Count);
array.SetValue(value, i);//value 为值,i 为索引
3.实例化类
Type t = Type.GetType(paramType);
Object o = Activator.CreateInstance(t);