We generally use ToLower or ToUpper in C#.But how can we change a string in title case.
Yes we can.We have System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase.
It takes string as parameter.
string strText = “my blog”;
string strTitleCase = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(strText);
That's It.
Enjoy Learning.
April 19, 2013
Make string title case in C#
Subscribe to:
Post Comments (Atom)
The Tech Pursuit
Keep asking better questions.
© Shatrughna Kumar. The Tech Pursuit.
Views expressed here are personal and do not represent any employer.
No comments:
Post a Comment