LINQ: Distinct values

前端 未结 7 1294
一生所求
一生所求 2020-11-22 16:29

I have the following item set from an XML:

id           category

5            1
5            3
5            4
5            3
5            3
<
7条回答
  •  感动是毒
    2020-11-22 17:09

    Just use the Distinct() with your own comparer.

    http://msdn.microsoft.com/en-us/library/bb338049.aspx

提交回复
热议问题