TitleCase vs PascalCase (sort of)
Note: this entry has moved.
A reader suggested I should use TextInfo.ToTitleCase method to turn the first of a string letter into uppercase. However, title case is a different thing from PascalCase. The former converts the first letter of each word into uppercase, and the rest to lowercase. So, for the one asking for a prize to Panos it won't come from me :p. Here's what you get from theToTitleCase
method:
// Writes "Hello World"
Console.WriteLine(CultureInfo.CurrentCulture.TextInfo.ToTitleCase("hello world"));
// Writes "Helloworld". Ups!
Console.WriteLine(CultureInfo.CurrentCulture.TextInfo.ToTitleCase("helloWorld"));
Anyone else that wants to win the prize? ;)