Equ
Equ copied to clipboard
Case insensitive comparisons
Hi,
I'm loving Equ and using it loads. Just come across a case where I'd like to perform a comparison of a class which contains a string property and I'd like the comparison to be case insensitive.
Looking at the code I was wondering if this could be achieved by making EqualityFunctionGenerator.MakeEqualsExpression
virtual so it could be easily overriden in a derived class and, where appropriate changed to provide case insensitive comparison of strings. The derived class could then be passed into the MemberwiseEqualityComparer<T>.Custom
method.
Does this sound plausible? Is there a better way to do this?
Thanks for your time and a great library.