解决方案 »

  1.   

    RadioButton a  = new RadioButton();
      

  2.   

    我知道,我程序一开始并不知道我要的是radiobutton,有可能是textbox。所以我声明了一个control 数组。
    但是后来发现,没有checked这个选项。我的意思是这样。 能帮我解决么。。 
      

  3.   


    if(a is RadioButton){}
    if(a is Button){}
      

  4.   

    if (test_1.text_con[i][j] is RadioButton) {
                                RadioButton rb = test_1.text_con[i][j] as RadioButton;
                                if(rb.Checked == true)
                                    MessageBox.Show("1");
                            }
                            if (test_1.text_con[i][j] is Button) {
                                MessageBox.Show("2");
                            
                            }
      

  5.   

    if(a is RadioButton){
         (( RadioButton)a).Checked=true
    }
    if(a is Button){}