In this quick post you will look at the method which will convert your string in Proper Case using C#.
Introduction
Here is a method which will convert your string in Proper Case, you just need to pass the string to this method and method will return the Proper Case string as a result.
public string ConvertToProperCase(string str)
{
string formattedStr = null;
if (str == null)
{
formattedStr = new System.Globalization.CultureInfo("en").TextInfo.ToTitleCase(str.ToLower());
}
return formattedStr;
}