Stop Using string.ToLowerInvariant() to Compare Strings. InvariantCulture Comparisons are Slow

from blog The Angry Dev, | ↗ original
A lot of people use ToLower() or ToLowerInvariant() to normalise their strings before comparing them with ==, STOP IT. This is very slow, and while that may not matter for 1 or 2 string comparasons, it mounts up in large projects. While there is a very small use case for using Invariant Culture, unless you are absolutely certain that you need it,...