In several projects now I have been writing a lot of boiler plate code in the form of equality and comparable implementations.
Resharper helps out a lot here, as it can auto-generate code where you select the fields that take part in the equality and then spits out boilerplate for you.
I was thinking since this code is quite predictable, yet still has lots of pitfalls, that it could maybe be lifted out of the classes themselves and ported to an attribute where you put an attribute above the fields that take part (maybe with an order number for equality).
Because "think before you code":
- Why doesn't this already exist (or did my google skills fail me)
- Why is this a bad idea?