Type type = Type.GetType("System.Windows.Forms.TextBox")? Type type = Type.GetType("System.Windows.Forms.TextBox")?TextBox obj = (TextBox)Activator.CreateInstance(type);为什么会出现“空引用”?该怎样写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string assemblyQualifiedName = typeof(System.Windows.Forms.Form).AssemblyQualifiedName; string assemblyInformation = assemblyQualifiedName.Substring(assemblyQualifiedName.IndexOf(",")); Type type = Type.GetType("System.Windows.Forms.TextBox" + assemblyInformation);; TextBox obj = (TextBox)Activator.CreateInstance(type); //this.Controls.Add(obj); http://blog.csdn.net/fangxinggood/archive/2005/07/29/438404.aspx 要这么麻烦吗?我只是想通过"System.Windows.Forms.TextBox"创建一个实例有简单一点的办法吗? c#基于IOCP的SocketAsyncEventArgs服务器端(即时通讯端)如何处理并发客户端连接问题 gridview 里面的链接如何在前面加一个点 傻瓜问题 求救,如何用c#写代码保存下来 如何循环得到ListBox已选择的项 关于图片的存储,转换,显示的问题 有关IIF的问题,高分请教!!! C#.NET 中的类型转换问题? moss+RS Visual C#+SQL写的aspx程序问题 COM+分布式事务处理无法访问远程数据库服务器 透明色和白色怎么区分?怎么从系统颜色对话框里获得透明色?
string assemblyInformation = assemblyQualifiedName.Substring(assemblyQualifiedName.IndexOf(","));
Type type = Type.GetType("System.Windows.Forms.TextBox" + assemblyInformation);;
TextBox obj = (TextBox)Activator.CreateInstance(type);
//this.Controls.Add(obj);
有简单一点的办法吗?