We have a string.ToUpper and string.ToLower, but did you know that we've also got a ToTitleCase? It's not defined in the String class, but rather in the TextInfo class. Here's an example:
string lhello = "hello woRld";
lhello = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(lhello);
Console.WriteLine(lhello); //Hello World
Monday, August 4, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment