Friday, August 6, 2010

Convert only first letter of a sentence to uppercase


public
static string Capitalize(string input)
{
if(string.IsNullOrEmpty(input)) return string.Empty;
return input.Substring(0, 1).ToUpper() + input.Substring(1).ToLower();
}



No comments:

Post a Comment