我们在C#中有任何适当的功能吗?
private void button1_Click(object sender, EventArgs e)
{
string s1 = textBox1.Text;
}
Run Code Online (Sandbox Code Playgroud)
string s1 = new string(
textBox1.Text.Select(ch => char.IsLetter(ch) ? (char.IsUpper(ch) ?
char.ToLower(ch) : char.ToUpper(ch)) : ch).ToArray());
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
153 次 |
最近记录: |