Change String case according to CultureInfo : String Case « String « C# / CSharp Tutorial






using System;
using System.Globalization;


public class SamplesTextInfo  {

   public static void Main()  {
      string myString = "this Is a Test";

      TextInfo myTI = new CultureInfo("en-US",false).TextInfo;
      
      Console.WriteLine( "\"{0}\" to lowercase: {1}", myString, myTI.ToLower( myString ) );
      
      Console.WriteLine( "\"{0}\" to uppercase: {1}", myString, myTI.ToUpper( myString ) );

      Console.WriteLine( "\"{0}\" to titlecase: {1}", myString, myTI.ToTitleCase( myString ) );
   }
}








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)