Replies: 1 comment
-
The purpose of the equality contract is to preserve symmetry -- if you override it, you may break symmetry. Sometimes, that may be what the user wants but you're right, it shouldn't be taken lightly! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
After reading c# 9 records proposal I was experimenting with subclassing records and equality and I found that overriding
EqualityContract
breaks symmetry of the==
operator:EqualityContract
?Beta Was this translation helpful? Give feedback.
All reactions