谁能填写下面代码??

ljycn 2003-10-19 10:42:43
For Each mycon In Me.Controls
if mycon 的类型是 textbox
然后 将mycon转换成textbox 类型 mytemp
mytemp。text=“”
Next
...全文
31 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
dldl 2003-10-20
  • 打赏
  • 举报
回复
foreach(Control ctl in me.Controls)
{
if(ct1.ToString().indexof( "System.Windows.Forms.TextBox")>=0)
{
TextBox text=(TextBox)ct1;
text.text="";
}
}
就可以了!

110,499

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧