更新时间:2023-02-19 10:38:58
定义的鲜明特性是,它会返回一个无序集合( 文档)。
The defined behavior of Distinct is that it will return an unordered collection (Documentation).
不过目前执行的Linq中清晰到的对象将维持秩序。这并不能保证其他LINQ提供程序,虽然和行为不应依赖该等资料。
However the current implementation of Distinct in Linq to Objects will preserve order. This is not guaranteed for other LINQ providers though and the behavior should not be relied upon.