Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C#
/
Records
Why does a base record not compare equal to a derived record with the same shared values?
from Records
C# 14 / .NET 10
intermediate
1 min
Why does a base record not compare equal to a derived record with the same shared values?
Generated record equality includes the runtime record type through its equality contract.
Derived records always use reference equality.
Only sealed records support value equality.
The comparison throws whenever inheritance is present.
Check
Ask AI about this kata
Report an error
next kata
What does this program print?
Predict the output
A new version is available
Reload