当前位置: 代码迷 >> .NET Framework >> C# winform checkbox 的遍历,该如何处理
  详细解决方案

C# winform checkbox 的遍历,该如何处理

热度:122   发布时间:2016-05-02 00:59:14.0
C# winform checkbox 的遍历
我拖了很多个checkbox 在窗体,用什么方法遍历这些控件?谢谢。

------解决方案--------------------
C# code
            foreach(Control ctl in this.Controls)            {                CheckBox ck = ctl as CheckBox;                if (ck != null)                    ck.Checked = true;            }
------解决方案--------------------
探讨
C# code

foreach(Control ctl in this.Controls)
{
CheckBox ck = ctl as CheckBox;
if (ck != null)
ck.Checked = true;
……
  相关解决方案