试题详情
简答题请编程遍历页面上所有TextBox控件并给它赋值为string.Empty?
  • foreach(System.Windows.Forms.Controlcontrolinthis.Controls)
    {
    if(controlisSystem.Windows.Forms.TextBox)
    {
    System.Windows.Forms.TextBoxtb=(System.Windows.Forms.TextBox)control;
    tb.Text=String.Empty;
    }
    }
  • 关注下方微信公众号,在线模考后查看

热门试题