foreach (Control c in this.Panel1.Controls) 【控件名字 + 随便起的名字 in 页面控件】 (Control 什么意思)
{
if (c is RadioButton)
{
if (((RadioButton)c).Checked == true) 【判断】?()
{
Label2.Text ;(用label 显示 没写完..)
}
}
}高手能帮我讲讲 每行吗?
{
if (c is RadioButton)
{
if (((RadioButton)c).Checked == true) 【判断】?()
{
Label2.Text ;(用label 显示 没写完..)
}
}
}高手能帮我讲讲 每行吗?
解决方案 »
- 如何显示动态的数据
- 50分求Developer Express .net 的學習資料
- asp.net c#在内容页中怎样添加动态Title?
- 窗体Designer文件中的私有components是干什么用的?
- Dev的消息框XtraMessagebox按钮上的字怎么变成中文的
- 关于网页自动填表单的问题?
- .net中,中文插入数据库问题
- 求助!!怎样在web form下实现弹出一个yes/no的对话框,然后执行相应结果??在线等待
- 如何在win2000的到xp的界面_高分有送
- 代码分离
- 大家好 我又来求助了 关键字:c# emgu(opencv)
- SecondaryBuffer 构造函数提示“值不在预期范围内”
{
if (c is RadioButton) //如果是单选按钮
{
if (((RadioButton)c).Checked == true) //如果此单选按钮已被选中
{
Label2.Text ;//更新label2
}
}
}
foreach (Control c in this.Panel1.Controls) 【控件名字 + 随便起的名字 in 页面控件】 (Control 什么意思) //Control 是类型,比如这里指的是Control类
{
if (c is RadioButton)
{
if (((RadioButton)c).Checked == true) 【判断】?()//先把c转换成RadioButton类型,然后判断是否选中
{
Label2.Text ;(用label 显示 没写完..)
}
}
}
foreach (Control c in this.Panel1.Controls) 【控件名字 + 随便起的名字 in 页面控件】 (Control 什么意思) //Control是类型名(控件类),c嘛任意的一个别名,this.Panel1.Controls控件集合。表示遍历在控件Panel1中的每一个控件~
{
if (c is RadioButton)//如果遍历到得其中一个控件类型是单选框(RadioButton类型)
{
if (((RadioButton)c).Checked == true) 【判断】?()//将c的类型强制转换为单选框类型,并判断它的属性Checked是不是true(即是否选中)
{
Label2.Text ;(用label 显示 没写完..)//坑爹的没写完……
}
}
}