iequalitycomparer
IEqualityComparer<T> GetHashCode return same values when items are not equal?
In the \"Notes to Implementers\" section in the documentation for the GetHashCode method of the IEqualityComparer<T> interface, it states:[详细]
2023-04-10 13:09 分类:问答Why we implement GetHashCode in IEqualityComparer?
I want to get distinct items from List in C# by using IEqualityComparer interface. But I don\'t know about GetH开发者_如何学JAVAashCode. I have implement both GetHashCode and Equals methods. And how c[详细]
2023-04-09 07:03 分类:问答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 t2 contain the same properties, they are not the same object, so I have need to implement an[详细]
2023-03-27 22:28 分类:问答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. I created a compare class to do this work, but the execution of the function causes a big delay fr[详细]
2023-03-20 13:00 分类:问答Removing Items from a list of objects when an object property is duplicated
I am reasonably new to linq and c# so apologies if I am being dumb. I have a query which brings back a list of product info, prices of these products and categories these products are in based on some[详细]
2023-03-17 08:14 分类:问答Linq Union - IEqualityComparer and # of executions
Out of interest how does the GetHashCode of a concrete implementation of IEqualityComparer work? The reason that I ask is that I\'m using linq to union two collections, and when only the left collec[详细]
2023-03-13 16:07 分类:问答Compare two lists that contain a lot of objects (2th part)
Referring to the question that I previously asked: Compare two lists that contain a lot of objects It is impressive to see how fast that comparison is maide by implementing the IEqualityComparer int[详细]
2023-03-06 15:17 分类:问答Using IEqualityComparer for Union
I simply want to remove duplicates from two lists and combine them into one list. I also need to be able to define what a duplicate is. I define a duplicate by the ColumnIndex property, if the开发者_如[详细]
2023-03-05 09:50 分类:问答EqualityComparer<T>.Default vs. T.Equals
Suppose I\'ve got a generic MyClass<T> that needs to compare two objects of type <T>. Usually I\'d do something like ...[详细]
2023-03-01 21:05 分类:问答Enumerable.SequenceEqual<TSource> and EqualityComparer<T>
FromMSDN The SequenceEqual(IEnumerable, IEnumerable) method enumerates the two source seq开发者_StackOverflowuences in[详细]
2023-02-26 20:16 分类:问答