Create upper and lowercase versions of a string : String Case « String « C# / CSharp Tutorial






using System;  
  
class MainClass {   
  public static void Main() {   
    string str1 = "ABCDEabcde1234567890";   
    
    string strLow = str1.ToLower(); 
    string strUp =  str1.ToUpper(); 
    Console.WriteLine("Lowercase version of str1:\n " +  strLow); 
    Console.WriteLine("Uppercase version of str1:\n " +  strUp); 
  }
}
Lowercase version of str1:
 abcdeabcde1234567890
Uppercase version of str1:
 ABCDEABCDE1234567890








5.9.String Case
5.9.1.Create upper and lowercase versions of a string
5.9.2.Case Comparison
5.9.3.Change String case according to CultureInfo
5.9.4.String.ToUpper(CultureInfo)