C#CheckBox的用法
public frm()
         {
             InitializeComponent();
                        Select();
         }   
          public void Select()
         {                         
            if (CheckBox1.CheckState==CheckState.Checked)
             {
                 radioButton1.Enabled = true;
                 radiobutton2.Enabled = true;
                 combox1.Enabled = true;
             }
             else
             {
                  radioButton1.Enabled= false;
                  radiobutton2.Enabled = false;
                  combox1.Enabled = false;
             }
我想实现的功能是选中Checkbox1,radiobutton1和radiobutton2可以操作,否则radiobutton1和radiobutton2不可以操作
上面代码实现不了?请问高手错误在哪里?
------解决方案--------------------radioButton1.Enabled = checkbox1.checked;
radioButton2.Enabled = checkbox1.checked;
------解决方案--------------------if (CheckBox1.Checked)
------解决方案--------------------同意2楼的看法
------解决方案--------------------或者
if(CheckBox1.Checked.Equals(true))
------解决方案--------------------
------解决方案--------------------在checkbox的checkchange事件事件中调用Select();
------解决方案--------------------
------解决方案--------------------if (CheckBox1.Checked = true)