Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about iequalitycomparer

Read more about iequalitycomparer

python (65.2k questions)

javascript (44.3k questions)

reactjs (22.7k questions)

java (20.8k questions)

c# (17.4k questions)

html (16.3k questions)

r (13.7k questions)

android (13k questions)

Questions - iequalitycomparer

C# HashSet not using defined IEqualityComparer<>

I am trying to compare two HashSets of objects by using .SetEquals(). I looked at some guides and saw that I needed to implement IEqualityComparer<> as part of the class in order for it to work ...
test-img

Unknown

c#

hashset

iequalitycomparer

Votes: 0

Answers: 2

Latest Answer

If you're going to define Equals and GetHashCode by using every property of the object to calculate them, you might as well just switch to using a record: public record MemberDataRow( string ID, s...
test-img

Caius Jard

Implementing IEqualityComparer

I've added to my class the IEqualityComparer implementation, not sure if the code bellow is the correct one, especially the Equals(object x, object y) functions: should we override or make a new imple...
test-img

serge

c#

.net

.net-5

hashcode

iequalitycomparer

Votes: 0

Answers: 1

Latest Answer

According to the IEqualityComparer code example provided by microsoft, you will want to use the new keyword (so hiding the Equals implementation of the object) for implementing Equals. https://learn.m...
test-img

David

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved