どうも、ちょげ(@chogetarou)です。
文字列を全て小文字に変換する方法を紹介します。
方法

文字列を全て小文字に変換するには、ToLower()を使います。
具体的には、文字列からToLower()を呼び出します。
string result = text.ToLower();
上記のToLower()は、呼び出した文字列を全て小文字に変換した文字列を返します。
使用例
using System;
public class Example
{
public static void Main()
{
string greeting = "HELLO,CSHARP";
string result = greeting.ToLower();
Console.WriteLine(result);
}
}
/*
出力:Hhello,csharp
*/
コメント