C# ToLowerInvariant() 方法用于使用不变区域性的大小写规则将字符串转换为小写。
public string ToLowerInvariant()
它不带任何参数。
它返回一个字符串。
using System; public class StringExample { public static void Main(string[] args) { string s1 = "Hello C#"; string s2 = s1.ToLowerInvariant(); Console.WriteLine(s2); } }
输出:
hello c#
© Copyright 2011-2021 www.rocschool.com. All rights reserved. Developed by RocSchool. Powered by qibosoft X1.0 Code. 琼ICP备2021004297号-1