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.
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
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.
This comment is hidden because it contains spoiler information about the solution
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
This is less than optimal since it converts the whole name to lower case when we only need to compare the first letter.