Let\'s say I have two strings: a and b. To compare whether a and be have the same values when case is ignored, I\'ve always used:
// (Assume a and b have bee
ToLower() is not a comparison function, it puts the string to lower case. When the == operator is used on String objects in C# it is optimized by the compiler. At the core, Both depend on System.String.Equals as seen in Reflector.