2020-03-16 每日一例第8天
1.新建窗体应用程序,拖入label/textbox/radiobutton控件,并改text值;
2.button控件输入代码;
if (radioButton1.Checked)
{
textBox2.Text = textBox1.Text.ToUpper();
}
else
{
if (radioButton2.Checked)
{
textBox2.Text = textBox1.Text.ToLower();
}
else
{
MessageBox.Show("请选择对应的转换类型", "提示!", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
}
}
3.例题完成,最后效果如下;