【20090311-01】c#中判断控件类型

it2022-05-05  123

--

判断控件类型         1、可用控件的GetType函数,control.gettype().tostring,输出的类型带命名空间,如system.web.ui.webcontrols.button         2、也可用TypeName函数,typename(control),输出的类型不带命名空间,如button控件直接输出button类型

        3、CodeIf   (obj.GetType   Is   GetType(System.Windows.Forms.TextBox))

转载于:https://www.cnblogs.com/willwayer/archive/2009/03/11/1408898.html

相关资源:iOS-UI控件常见属性总结

最新回复(0)