I'm getting this FXCop Error because I overloaded the >= and <= operators on a certain type:
"Provide a method named 'Compare' as a friendly for operator 'Foo.operator >=(Foo, Foo)'."
I've been looking all over the place but I can't find a good example of how to implement this method. I know how to do the actual comparison, but FXCop wants me to create a Compare() method for the >, <, >= and <= operators. That means I have to somehow tell the Compare() method wether I want to check if the two parameters are greater than, smaller than, greater than or equal to or smaller than or equal to each others. I guess I could create a ComparisonOperator enum and pass that, but surely there's a more convenient way to do it?
Add your 2¢