图形界面上,如果单选框没有操作,就提示“请选择”,应该如何写
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void radioButton1_CheckedChanged_1(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
label1.Text = "你选择了A";
}
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked)
{
label1.Text = "你选择了B";
}
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
if (radioButton3.Checked)
{
label1.Text = "你选择了C";
}
}
private void radioButton4_CheckedChanged(object sender, EventArgs e)
{
if (radioButton4.Checked)
{
label1.Text = "你选择了D";
}
}
private void button1_Click(object sender, EventArgs e)
{
if (radioButton3.Checked)
{
MessageBox.Show("恭