귀하의 문자열이 −
라고 가정해 보겠습니다.str = "AMIT";
위의 대문자 문자열을 소문자로 변환하려면 ToLower() 메서드를 사용하십시오 -
Console.WriteLine("Converted to LowerCase : {0}", str.ToLower()); 예시
다음은 C#에서 대소문자를 변환하는 코드입니다.
using System;
using System.Collections.Generic;
using System.Text;
namespace Demo {
class MyApplication {
static void Main(string[] args) {
string str;
str = "AMIT";
Console.WriteLine("UpperCase : {0}", str);
// convert to lowercase
Console.WriteLine("Converted to LowerCase : {0}", str.ToLower());
Console.ReadLine();
}
}
} 출력
UpperCase : AMIT Converted to LowerCase : amit