When comparing two strings, we should not use .ToLower() and .ToUpper() ⚠️
ToLower() and ToUpper() create new string in the memory
Benefits of using string.Equals instead:
⏩ string comparison gives clear intent by specifying Ignore Case
⏩ It does not create new strings in memory, so they are performant than the ToLower/ToUpper
0 Comments