Closed FutureTD closed 6 years ago
Is there a way to make the string equality comparer case insensitive using the StringComparison.OrdinalIgnoreCase, I would prefer to no have to do .ToUpper() or .ToLower() if possible.
Sure; you can pass it as the second parameter to a key comparer.
Using the classic Person example, you can do this:
Person
ComparerBuilder.For<Person>().OrderBy(p => p.LastName, StringComparison.OrdinalIgnoreCase);
Is there a way to make the string equality comparer case insensitive using the StringComparison.OrdinalIgnoreCase, I would prefer to no have to do .ToUpper() or .ToLower() if possible.