关于 radiobutton的问题 现有六个radiobutton 如何取已经选择的那个radiobutton的text值?谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 foreach (Control vControl in Controls) if ((vControl is RadioButton) && (((RadioButton)vControl).Checked)) { Text = ((RadioButton)vControl).Text; break; } 遍历string str;foreach( control ctl in group.controls ){ if( typeof(ctl) == RaidonButton ) { if(ctl.checked) { str = ctl.Text; return; } }} private void radioButton1_CheckedChanged(object sender, EventArgs e) { string strButtonText=""; if (radioButton1.Checked) strButtonText = radioButton1.Text; if (radioButton2.Checked) strButtonText = radioButton2.Text; if (radioButton3.Checked) strButtonText = radioButton3.Text; if (radioButton4.Checked) strButtonText = radioButton4.Text; if (radioButton5.Checked) strButtonText = radioButton5.Text; if (radioButton6.Checked) strButtonText = radioButton6.Text; } mapxtreme 如何实现“热区”的功能? 關於linq的問題 急求 速度帮忙啊、、、、、 高分哭求gridview的动态显示问题 VS2005中,制作的Setup安装包的图标怎么设定 ImageList空间如何动态设置其大小 关于Dictionary 泛型类的问题 我的代码那里错了??关于子窗体不重复出现的代码 help!当前鼠标位置??? C# 实现语音功能 数据插入问题 winform程序,最小化,内存使用就一下减低很多?隐藏内存使用不会减低?
if ((vControl is RadioButton) &&
(((RadioButton)vControl).Checked))
{
Text = ((RadioButton)vControl).Text;
break;
}
string str;
foreach( control ctl in group.controls )
{
if( typeof(ctl) == RaidonButton )
{
if(ctl.checked)
{
str = ctl.Text;
return;
}
}
}
{
string strButtonText="";
if (radioButton1.Checked)
strButtonText = radioButton1.Text;
if (radioButton2.Checked)
strButtonText = radioButton2.Text;
if (radioButton3.Checked)
strButtonText = radioButton3.Text;
if (radioButton4.Checked)
strButtonText = radioButton4.Text;
if (radioButton5.Checked)
strButtonText = radioButton5.Text;
if (radioButton6.Checked)
strButtonText = radioButton6.Text;
}