using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Example35
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Shown(object sender, EventArgs e)
{
this.Text = "将字母全部转换为大写或小写";
}
private void button1_Click(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
textBox2.Text = textBox1.Text.ToUpper(); //转换为 大写
}
if (radioButton2.Checked)
{
textBox2.Text = textBox1.Text.ToLower(); //转换为 小写
}
}
}
}