我已经得到了C#中的以下内容:
字符串类型名=System.Int32的;
字符串值=4;
载文应采取两个字符串来生成指定类型的具有指定值的对象...
结果应该是:
对象o = CreateUnknownType(类型名称,值);
...
INT32测试=(Int32)在O;
解决方案
这是什么你在想什么?
对象result = Convert.ChangeType(4,Type.GetType(System.Int32的));
i've got the following in C#:
string typename = "System.Int32";
string value = "4";
theses two strings should be taken to generate an object of the specified type with the specified value...
result should be:
object o = CreateUnknownType(typename, value);
...
Int32 test = (Int32)o;
解决方案
Is this what are you are thinking?
object result = Convert.ChangeType("4", Type.GetType("System.Int32"));