✅ EqualityComparer
Hello, anyone know of this code work ?
-->
EqualityComparer<ICollection<myclass>> .Default.Equals(myclassS, x.myclassS)
cause i'm wondering if this will trigger the equals override inside myclass to compare each element or if it will do an equal on the collection to look if they have the same hashcode or something like that6 Replies
thinker227#5176
REPL Result: Success
Result: bool
Compile: 774.298ms | Execution: 95.486ms | React with ❌ to remove this embed.
It calls
List<T>.Equals
(in this case)
EqualityComparer<T>
doesn't do anything special for collectionsSo if i want to compare 2 list i should make my own method or can i override the equals methods without creating my own List class ?
You can use
SequenceEqual
from Linqthinker227#5176
REPL Result: Success
Result: bool
Compile: 456.640ms | Execution: 48.174ms | React with ❌ to remove this embed.
😮
i will try right away
thanks !