Ad
  • Default User Avatar

    Agreed. Since we know that we have to check the first letter of the name, then we should lower case the first letter ONLY - lower casing the WHOLE name is a waste of memory and processing. Also, string has a method called ToLowerInvariant which can be faster than regular ToLower method, since it doesn't lower case considering the culture code.

  • Default User Avatar

    at no point does he save the ToLower name and it is never used for anything then the check so the return will still have match the name you pasted in Upper or Lower