参考书籍 《C# in a nutshell 8.0》
基本数据单元是序列和元素,序列是任何实现了IEnumberable<T>接口的对象,而其中的每一项叫做一个元素。
Names就是一个序列,"Tom","Dick","Harry"就是元素。
Names 表示内存中的本地对象的集合,称之为"本地序列"
We call this a local sequence because it represents a local collection
of objects in memory.
查询运算符(query operator)是转换序列的方法。一个典型的查询运算符,接受一个输入序列,转换产生一个输出序列。
A query operator is a method that transforms a sequence. A typical
query operator accepts an input sequence and emits a transformed
output sequence.
在命名空间System.Linq中的Enumerable类,定义了约40种查询操作(query operators)--所有都是以静态扩展方法的形式来实现的。
称为标准查询运算符。
In the Enumerable class in System.Linq,there are around 40 query operators—all implemented as static extension methods. These are called standard query operators.
NOTE
Queries that operate over local sequences are called local queries or LINQ-to-objects queries.
LINQ also supports sequences that can be dynamically fed from a remote data source
such as a SQL Server database. These sequences additionally implement the IQueryable<T> interface and are supported through a matching set of standard query operators in the Queryable class. We discuss this further in "Interpreted Queries"