Top "Iequalitycomparer" questions

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

How to use linq `Except` with multiple properties with different class?

I am trying to learn the Linq/Lambda expressions and was stuck at somewhere. What I was Doing I have …

c# linq except iequalitycomparer
Using an IEqualityComparer with a LINQ to Entities Except clause

I have an entity that I'd like to compare with a subset and determine to select all except the subset. …

linq linq-to-entities iequalitycomparer
What is the difference between using IEqualityComparer and Equals/GethashCode Override?

When i am using dictionaries sometimes I have to change the default Equals meaning in order to compare Keys. I …

c# equals equality gethashcode iequalitycomparer
linq Except and custom IEqualityComparer

I'm trying to implement a custom comparer on two lists of strings and use the .Except() linq method to get …

c# iequalitycomparer
IEqualityComparer for anonymous type

I have this var n = ItemList.Select(s => new { s.Vchr, s.Id, s.Ctr, s.Vendor, s.Description, …

linq lambda anonymous-types iequalitycomparer
Best way to compare two Dictionary<T> for equality

Is this the best way to create a comparer for the equality of two dictionaries? This needs to be exact. …

c# generics collections dictionary iequalitycomparer
LINQ to Entities does not recognize the method 'Boolean Contains

I have written this statement: if (!db.Customers.Contains<Customer>(customer,customerCompairor)) { db.Customers.Add(customer); } Don't see …

.net c#-4.0 iequalitycomparer
What problem does IStructuralEquatable and IStructuralComparable solve?

I've noticed these two interfaces, and several associated classes, have been added in .NET 4. They seem a bit superfluous to …

.net equality icomparable iequalitycomparer
IEqualityComparer<T> that uses ReferenceEquals

Is there a default IEqualityComparer<T> implementation that uses ReferenceEquals? EqualityComparer<T>.Default uses ObjectComparer, which …

c# .net iequalitycomparer referenceequals
Implementing IEqualityComparer<T> on an object with two properties in C#

I have a case where I need to grab a bunch of items on distinct, but my source is a …

c# linq distinct iequalitycomparer