使用Linq中的Distinct方法對序列進行去重操做

使用Linq提供的擴展方法Distinct能夠去除序列中的重複元素。this 該方法具備如下兩種重載形式:spa (1)public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source) (重載1).net 經過使用默認的相等比較器對值進行比較並返回序列中的非重複元素。code (2)publ
相關文章
相關標籤/搜索