using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
string str = "Hello";
str.ToLower();// 把字符串的所有字符转化为小写
Console.WriteLine(str);// Hello,证明字符串具有不可修改性
str = str.ToLower();// 形成新的字符串,字符串变量指向新的字符串
Console.WriteLine(str);
Console.ReadKey();
}
}
}
把字符串的所有字符转化为小写
最新推荐文章于 2023-04-13 15:37:35 发布