主题:[讨论]菜鸟问题,求高手帮解一下
private void button1_Click(object sender, EventArgs e)
{
if(this.radioButton1.Checked==true){
MessageBox.Show(this.radioButton1.Text,"",MessageBoxButtons.OK);
}
else if (this.radioButton2.Checked == true)
{
MessageBox.Show(this.radioButton2.Text,"",MessageBoxButtons.OK);
}else{
MessageBox.Show(this.radioButton3.Text, "", MessageBoxButtons.OK);
}
}
点击保存时消息框提示单项选择所选择的项,三个我能判断Checked属性为true,但是万一有一百个要怎么去得到所选择的项呢,怎么循环?
{
if(this.radioButton1.Checked==true){
MessageBox.Show(this.radioButton1.Text,"",MessageBoxButtons.OK);
}
else if (this.radioButton2.Checked == true)
{
MessageBox.Show(this.radioButton2.Text,"",MessageBoxButtons.OK);
}else{
MessageBox.Show(this.radioButton3.Text, "", MessageBoxButtons.OK);
}
}
点击保存时消息框提示单项选择所选择的项,三个我能判断Checked属性为true,但是万一有一百个要怎么去得到所选择的项呢,怎么循环?