Equality between two enumerables

前端 未结 2 458
长情又很酷
长情又很酷 2021-01-03 19:46

I have two enumerables with the exact same reference elements, and wondering why Equals wouldn\'t be true.

As a side question, the code below to compare each element

2条回答
  •  迷失自我
    2021-01-03 20:07

    .Equals is comparing the references of the enumerables, not the elements they contain.

提交回复
热议问题