Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify record equality #40986

Merged
merged 1 commit into from
May 20, 2024
Merged

Clarify record equality #40986

merged 1 commit into from
May 20, 2024

Conversation

Suchiman
Copy link
Contributor

@Suchiman Suchiman commented May 17, 2024

Records do not specifically use reference equality on reference types, they compare members using EqualityComparer<T>.Default.Equals which means that overriden Equality is respected


Internal previews

馃搫 File 馃敆 Preview link
docs/csharp/fundamentals/types/records.md Introduction to record types in C#

Records do not specifically use reference equality on reference types, they compare members using `EqualityComparer<T>.Default.Equals` which means that overriden Equality is respected
@Suchiman Suchiman requested a review from BillWagner as a code owner May 17, 2024 13:55
@dotnet-bot dotnet-bot added this to the May 2024 milestone May 17, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates PR is created by someone from the .NET community. label May 17, 2024
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @Suchiman

I'll :shipit: now.

@BillWagner BillWagner merged commit 154ec58 into dotnet:main May 20, 2024
12 checks passed
@Suchiman Suchiman deleted the patch-1 branch May 20, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-csharp/svc fundamentals/subsvc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants