LINQ Distinct操作符:筛选不重复值.pdfVIP

  • 3
  • 0
  • 约8.13千字
  • 约 10页
  • 2026-06-09 发布于北京
  • 举报

6.Distinct操作符

在第三章的前几节中,我们学习了之前学过的操作符。

而今天我们学习新的操作符Distinct,

Distinct的中文意思是:清晰的、不同

的。

LINQDistinct简介:

筛选序列中不相同的值。用于查询不重复的结果集。生成SQL语句为:SELECTDISTINCT[

City]FROM[Customers]

LINQDistinct示例代码

/*****************************************************************************梁

谢****************************************************************************/

usingSystem.Collections.Generic;usingSystem.Linq;using

UnityEngine;namespaceUniRxson{publicclass

LINQDistinctExample:MonoBehaviour{privatevoidStart(){

varna

文档评论(0)

1亿VIP精品文档

相关文档