Convert First letter to upper case in string

Ankaprasad
Posted by Ankaprasad under C# category on | Points: 40 | Views : 672

public static string ToUpperFirstLetter(string source)
{
if (string.IsNullOrEmpty(source))
return string.Empty;
char[] letters = source.ToCharArray();
letters[0] = char.ToUpper(letters[0]);
return new string(letters);
}

Comments or Responses

Login to post response