Top "Iequalitycomparer" questions

IEqualityComparer is a .NET framework interface that allows the implementation of customized equality comparison for collections.

How to use the IEqualityComparer

I have some bells in my database with the same number. I want to get all of them without duplication. …

c# linq iequalitycomparer
Distinct not working with LINQ to Objects

class Program { static void Main(string[] args) { List<Book> books = new List<Book> { new Book { Name="…

c# .net linq iequatable iequalitycomparer
How to implement IEqualityComparer to return distinct values?

I have a L2E query that returns some data that contains duplicate objects. I need to remove those duplicate …

c# entity-framework distinct iequalitycomparer
Pass a lambda expression in place of IComparer or IEqualityComparer or any single-method interface?

I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort(IComparer here) …

linq extension-methods ienumerable iequalitycomparer icomparer
Linq Except with custom IEqualityComparer

I am trying to find the difference between two generic lists, as in the example below. Even though t1 and …

c# linq-to-objects iequalitycomparer
What's the role of GetHashCode in the IEqualityComparer<T> in .NET?

I'm trying to understand the role of the GetHashCode method of the interface IEqualityComparer. The following example is taken from …

c# .net gethashcode iequalitycomparer
What is the difference between IEqualityComparer<T> and IEquatable<T>?

I want to understand the scenarios where IEqualityComparer<T> and IEquatable<T> should be used. The …

c# .net equals iequalitycomparer iequatable
Checking for equality in Objective-C

How do i check the key in dictionary is same as the string in method parameter? i.e in below …

objective-c iequalitycomparer
EqualityComparer<T>.Default vs. T.Equals

Suppose I've got a generic MyClass<T> that needs to compare two objects of type <T>. …

c# .net generics comparison iequalitycomparer
Using IEqualityComparer for Union

I simply want to remove duplicates from two lists and combine them into one list. I also need to be …

c# linq iequalitycomparer