Convert String to Camel Case in C#.net
Declare namespace
Declare namespace
using System.Globalization;
Method for Convert String into CamelCase in C#.net
private string ConvertStringToCamelCase(string str)
{
TextInfo obj = new CultureInfo("en-US", false).TextInfo;
return obj.ToTitleCase(str);
}
Call ConvertStringToCamelCase() like this
{
TextInfo obj = new CultureInfo("en-US", false).TextInfo;
return obj.ToTitleCase(str);
}
MessageBox.Show(ConvertStringToTitle("Lakshmi nAARAYANAN"));
MessageBox.Show(ConvertStringToTitle("lakshmi nAARAYANAN"));
Output:
Lakshmi Narayanan