Friday, February 1, 2008

Capitalize Initial in C#

private static string CapitalizeInitial(string strValue)
{
if (strValue.Length == 0)
return strValue;

return String.Concat( strValue.Substring( 0, 1 ).ToUpper(),
strValue.Substring( 1 ) );
}

No comments: