Introduction:
In my previous article I have explained about how to How to get the keycode for different browser for keyboard characters.
In this article I will explain about the process of converting a string to
upper,lower and title case using c#.net.
Explanation:
To convert the string to title case
the below function is used.
public static
string ToTitleCase(string
txt)
{
System.Globalization.CultureInfo cultureInfo = System.Threading. Thread.CurrentThread. CurrentCulture;
System.Globalization.TextInfo txtInfo = cultureInfo.TextInfo;
return txtInfo.ToTitleCase(txt);;
}
To convert
to upper case ToUpper()
method is used and to convert to lower case ToLower()
Method is used.
Do you
like this article. Help us to improve.Post your comments below.
Comments
Post a Comment