自己写了个GetType();
可以直接使用
Type _TextBox = GetType("System.Windows.Forms.TextBox");
Type _Process = GetType("System.Diagnostics.Process");
全部的方法.
/// <summary>
/// 根据类全名在当前程序集里获取TYPE zgke@sina.com qq:116149
/// </summary>
/// <param name="p_TypeFullName">类全名 System.Windows.Forms.TextBox</param>
/// <returns>Type</returns>
public static Type GetType(string p_TypeFullName)
{
Type _TypeInfo = Type.GetType(p_TypeFullName);
if (_TypeInfo != null) return _TypeInfo;
Assembly[] _Assembly = AppDomain.CurrentDomain.GetAssemblies();
for (int i = 0; i != _Assembly.Length; i++)
{
_TypeInfo = _Assembly[i].GetType(p_TypeFullName);
if (_TypeInfo != null) return _TypeInfo;
}
return null;
}