Replies: 1 comment 13 replies
-
Typically you wouldn't override it, but the compiler would. In the compiler-generated |
Beta Was this translation helpful? Give feedback.
13 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.
-
The record type of C# 9 has the following property
If the record is not sealed, that property will be virtual so it can be overridden.
Unfortunately the docs do not state what I would use this property for. Why would I ever want to override this property? Can you give me a somewhat realistic example?
I tried to override the
EqualityContract
property to allow equality of derived types but it doesn't work. This raised the question, if overriding it can't be used for that, what can it be used for?Beta Was this translation helpful? Give feedback.
All reactions