Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何从类型';她叫什么名字?_C#_.net - Fatal编程技术网

C# 如何从类型';她叫什么名字?

C# 如何从类型';她叫什么名字?,c#,.net,C#,.net,这是我的代码: using System.Windows.Forms; Type type = typeof(Form); Type type2 = Type.GetType(type.FullName); 结果:type2==null 我做错了什么?也许你可以试试: Type type2 = Type.GetType(type.AssemblyQualifiedName);

这是我的代码:

using System.Windows.Forms;

Type type = typeof(Form);
Type type2 = Type.GetType(type.FullName);
结果:type2==null

我做错了什么?

也许你可以试试:

Type type2 = Type.GetType(type.AssemblyQualifiedName);