What's the recommended best practice for using IEqualityComparer?

前端 未结 6 1109
栀梦
栀梦 2020-12-30 09:33

I\'m looking for real world best practices, how other people might have implemented solutions with complex domains.

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-30 09:48

    The list uses this interface alot, so you can say a.Substract(b) or other of these nice functions.

    Just remember: If you're objects don't return the same Hashcode, the Equals is not called.

提交回复
热议问题