.Net Tip: Convert a String to Title Case
If you have a string like "hello world" and you want to use it in a title, you'll probably need to convert this string to "Hello World". The .Net framework gives us this ability out-of-the-box using the TextInfo.ToTitleCase method:
string helloWorld = "hello world";
Console.WriteLine(System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(helloWorld));
This will end up printing "Hello World" on the screen.
Enjoy,
Shay.