新手求救

ll123 2012-03-27 03:01:45

if (radioButton1.Checked | radioButton2.Checked | radioButton3.Checked | radioButton4.Checked | radioButton5.Checked | radioButton6.Checked)
{
this.Hide();
Form1 f = new Form1();
f.Show();
RadioButton u = new RadioButton();
MessageBox.Show();
}

我想问MessageBox.Show里想输出所选中radioButton的Text的信息。
...全文
62 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
挑粪编码员 2012-03-27
  • 打赏
  • 举报
回复
CheckBox.Text应该就可以了吧
bdmh 2012-03-27
  • 打赏
  • 举报
回复

StringBuilder sb = new StringBuilder();
if (checkBox1.Checked)
sb.Append(checkBox1.Text);
if (checkBox2.Checked)
sb.Append(checkBox2.Text);
if (checkBox3.Checked)
sb.Append(checkBox3.Text);
MessageBox.Show(sb.ToString());

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧