using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Globalization;
namespace 首字母大写
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text = "";
}
private void button1_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(textBox1.Text))
{
return;
}
TextInfo textInfo = new CultureInfo("en-US").TextInfo;
textBox2.Text = textInfo.ToTitleCase(textBox1.Text);
textBox3.Text = textInfo.ToLower(textBox1.Text);
textBox4.Text = textInfo.ToUpper(textBox1.Text);
}
}
}
09-14
374
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-28
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交