Tuesday, October 25, 2005

VB.NET ProperCase to TitleCase in C#

VBForums.com - FYI - You can use VB specific functions in any C# project: ".NET does have a way to convert to Propercase (now called Titlecase) in C#...
I wrote a quick example for ya!

be sure to add
using System.Globalization;

CultureInfo ci = new CultureInfo('en'); //Create a new CultureInfo class for the english language
TextInfo cc = ci.TextInfo; //Get the textinfo class from the CultureInfo object
MessageBox.Show(cc.ToTitleCase('helLo joP hOw ArE yOU?'));"
Post a Comment