生成运算 (C#)Generation Operations (C#)

生成是指创建新的值序列。Generation refers to creating a new sequence of values.

下面一节列出了执行生成的标准查询运算符方法。The standard query operator methods that perform generation are listed in the following section.

方法Methods

方法名Method Name 描述Description C# 查询表达式语法C# Query Expression Syntax 详细信息More Information
DefaultIfEmptyDefaultIfEmpty 用默认值单一实例集合替换空集合。Replaces an empty collection with a default valued singleton collection. 不适用。Not applicable. Enumerable.DefaultIfEmpty

Queryable.DefaultIfEmpty
Empty 返回一个空集合。Returns an empty collection. 不适用。Not applicable. Enumerable.Empty
范围Range 生成包含数字序列的集合。Generates a collection that contains a sequence of numbers. 不适用。Not applicable. Enumerable.Range
RepeatRepeat 生成包含一个重复值的集合。Generates a collection that contains one repeated value. 不适用。Not applicable. Enumerable.Repeat

请参阅See also