IEqualityComparer for Annoymous Type

前端 未结 2 1718
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-09 14:35

Firstly I have seen IEqualityComparer for anonymous type and the answers there do not answer my question, for the obvious reason that I need an IEqualityComparer no

2条回答
  •  无人及你
    2021-02-09 14:54

    This post may get what you want. Although for .NET 2.0 it also works for newer versions (see the bottom of this post for how to achieve this). In contrast to Jon Skeets solution we won´t use a factory-method like create. But this is only syntactic sugar I think.

提交回复
热议问题