当前位置: 代码迷 >> 综合 >> 把字符串的所有字符转化为小写
  详细解决方案

把字符串的所有字符转化为小写

热度:69   发布时间:2024-01-17 03:39:33.0
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();}}}


  相关解决方案