110,538
社区成员
发帖
与我相关
我的任务
分享
Type type = Type.GetType("int", false, true);
object object_NewValue = Activator.CreateInstance(type, true);
Type str_type = Type.GetType("System.Int32", false, true);
object object_NewValue = Activator.CreateInstance(str_type, true);
str_type object_NewValue;
好像不行define type_int int;
string type_int="System.Int32";
Type type = Type.GetType(type_int,true,true);
object a = 0;
int b = (int)Activator.CreateInstance(type);
MessageBox.Show(b.ToString());
string str_type = "System.Int32";
Type type = Type.GetType(str_type);
object object_NewValue = Activator.CreateInstance(type);
sw.WriteLine("abc"+i.ToString())