Convert LowerCase and UpperCase to TitleCase in .NET


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. string strLow = "lower case";
  2. string strT = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(strLow);
  3. Console.WriteLine("Lower Case to Title Case: " + strT);
  4.  
  5. string strCap = "UPPER CASE";
  6. strT = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(strCap.ToLower());
  7. Console.WriteLine("Upper Case to Title Case: " + strT);

URL: http://www.devcurry.com/2009/12/convert-lowercase-and-uppercase-to.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.