c# - Make first letter of a string upper case (with maximum performance) - Stack Overflow

PHOTO EMBED

Thu Dec 08 2022 22:58:46 GMT+0000 (Coordinated Universal Time)

Saved by @Hack3rmAn #cs

public static string FirstCharToUpper(string input)
{
    if (String.IsNullOrEmpty(input))
        throw new ArgumentException("ARGH!");
    return input.First().ToString().ToUpper() + input.Substring(1);
}
content_copyCOPY

https://stackoverflow.com/questions/4135317/make-first-letter-of-a-string-upper-case-with-maximum-performance