1.where Filtering Operators Description Where Returns values from the collection based on a predicate function OfType Returns values from the collection based on a specified type. However, it will depend on their ability to cast to a specified type.…
Grouping Operators Description GroupBy GroupBy操作返回根据一些键值进行分组,每组代表IGrouping<TKey,TElement>对象 ToLookup ToLookup is the same as GroupBy; the only difference is the execution of GroupBy is deferred whereas ToLookup execution is immediate. IList<Stude…
Element Operators (Methods) Description ElementAt 返回指定索引的元素,如果索引超过集合长度,则抛出异常 ElementAtOrDefault 返回指定索引的元素,如果索引超过集合长度,则返回元素的默认值,不抛出异常 First 返回集合的第一个元素,可以根据指定条件返回 FirstOrDefault 返回集合的第一个元素,可以根据指定条件返回,如果集合不存在元素,则返回元素的默认值 Last 返回集合中的最后一个元素,可以根据条件返回 LastO…