The best way to do this?
Tried things like that:
public String FormatColumnName(String columnName)
{
String formatedColumnName = columnName.Replace('_', ' ').Trim();
StringBuilder result = new StringBuilder(formatedColumnName);
result[0] = char.ToUpper(result[0]);
return result.ToString();
}
Didn’t work for me, maybe someone could give me a clean Solution on how I can do that.
How about:
ToTitleCasechanges “lower case words” to “Lower Case Words” (but doesn’t touch upper case), hence the need toToLower– then we remove the spaces withReplace.