请高手解释下,这个方法的含义
private void ControlInfo(Boolean B)
        {
            foreach (Control ct in this.groupBox1.Controls)
            {
                if (ct is TextBox)
                {
                    if (B)
                    {
                        ct.Enabled = true;
                    }
                    else
                    {
                        ct.Enabled = false;
                    }
                }
            }
        }

解决方案 »

  1.   


    private   void   ControlInfo(Boolean   B)
                    {
                            foreach   (Control   ct   in   this.groupBox1.Controls)
                            {
    //遍历groupBox里的控件
                                    if   (ct   is   TextBox)
                                    {
    //如果该控件是TextBox
                                            if   (B)
                                            {
    //这个B是传递过来的参数,是做什么用的只有你才知道,要其它代码才知道
                                                    ct.Enabled   =   true;
    //将该控件设为可用
                                            }
                                            else
                                            {
                                                    ct.Enabled   =   false;
    //将代码设为不可用
                                            }
                                    }
                            }
                    }
      

  2.   

    把一个groupbox里的textbox  的enable 设为Bprivate   void   ControlInfo(Boolean   B) 
                    { 
                            foreach   (Control   ct   in   this.groupBox1.Controls) 
                            { 
                                    if   (ct   is   TextBox) 
                                    { 
       ct .Enabled = B //这样不更好??                                } 
                            } 
                    }
      

  3.   

    Control这个是类吗,看帮助没看懂???能具体说下吗???
      

  4.   

     foreach   (Control   ct   in   this.groupBox1.Controls)这句代码中括号中的意思是,实例化ct 在groupBox1控件中
    后面的.Controls是什么意思!!!
    求解