OrderedDictionary<TKey,TValue> 类

定义

generic <typename TKey, typename TValue>
public ref class OrderedDictionary : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<TKey, TValue>>, System::Collections::Generic::IDictionary<TKey, TValue>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>>, System::Collections::Generic::IList<System::Collections::Generic::KeyValuePair<TKey, TValue>>, System::Collections::Generic::IReadOnlyCollection<System::Collections::Generic::KeyValuePair<TKey, TValue>>, System::Collections::Generic::IReadOnlyDictionary<TKey, TValue>, System::Collections::Generic::IReadOnlyList<System::Collections::Generic::KeyValuePair<TKey, TValue>>, System::Collections::IDictionary, System::Collections::IList
public class OrderedDictionary<TKey,TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>, System.Collections.Generic.IDictionary<TKey,TValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>>, System.Collections.Generic.IList<System.Collections.Generic.KeyValuePair<TKey,TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>, System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>, System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<TKey,TValue>>, System.Collections.IDictionary, System.Collections.IList
type OrderedDictionary<'Key, 'Value> = class
    interface ICollection<KeyValuePair<'Key, 'Value>>
    interface seq<KeyValuePair<'Key, 'Value>>
    interface IEnumerable
    interface IDictionary<'Key, 'Value>
    interface IList<KeyValuePair<'Key, 'Value>>
    interface IReadOnlyCollection<KeyValuePair<'Key, 'Value>>
    interface IReadOnlyDictionary<'Key, 'Value>
    interface IReadOnlyList<KeyValuePair<'Key, 'Value>>
    interface ICollection
    interface IDictionary
    interface IList
Public Class OrderedDictionary(Of TKey, TValue)
Implements ICollection(Of KeyValuePair(Of TKey, TValue)), IDictionary, IDictionary(Of TKey, TValue), IEnumerable(Of KeyValuePair(Of TKey, TValue)), IList, IList(Of KeyValuePair(Of TKey, TValue)), IReadOnlyCollection(Of KeyValuePair(Of TKey, TValue)), IReadOnlyDictionary(Of TKey, TValue), IReadOnlyList(Of KeyValuePair(Of TKey, TValue))

类型参数

TKey
TValue
继承
OrderedDictionary<TKey,TValue>
实现

构造函数

OrderedDictionary<TKey,TValue>()
OrderedDictionary<TKey,TValue>(IDictionary<TKey,TValue>)
OrderedDictionary<TKey,TValue>(IDictionary<TKey,TValue>, IEqualityComparer<TKey>)
OrderedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)
OrderedDictionary<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>, IEqualityComparer<TKey>)
OrderedDictionary<TKey,TValue>(IEqualityComparer<TKey>)
OrderedDictionary<TKey,TValue>(Int32)
OrderedDictionary<TKey,TValue>(Int32, IEqualityComparer<TKey>)

属性

Capacity
Comparer
Count
Item[TKey]
Keys
Values

方法

Add(TKey, TValue)
Clear()
ContainsKey(TKey)
ContainsValue(TValue)
EnsureCapacity(Int32)
Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetAt(Int32)
GetEnumerator()
GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
IndexOf(TKey)
Insert(Int32, TKey, TValue)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
Remove(TKey)
Remove(TKey, TValue)
RemoveAt(Int32)
SetAt(Int32, TKey, TValue)
SetAt(Int32, TValue)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)
TrimExcess()
TrimExcess(Int32)
TryAdd(TKey, TValue)
TryGetValue(TKey, TValue)

显式接口实现

ICollection.CopyTo(Array, Int32)
ICollection.IsSynchronized
ICollection.SyncRoot
ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>)
ICollection<KeyValuePair<TKey,TValue>>.Contains(KeyValuePair<TKey,TValue>)
ICollection<KeyValuePair<TKey,TValue>>.CopyTo(KeyValuePair<TKey,TValue>[], Int32)
ICollection<KeyValuePair<TKey,TValue>>.IsReadOnly
ICollection<KeyValuePair<TKey,TValue>>.Remove(KeyValuePair<TKey,TValue>)
IDictionary.Add(Object, Object)
IDictionary.Contains(Object)
IDictionary.GetEnumerator()
IDictionary.IsFixedSize
IDictionary.IsReadOnly
IDictionary.Item[Object]
IDictionary.Keys
IDictionary.Remove(Object)
IDictionary.Values
IDictionary<TKey,TValue>.Keys
IDictionary<TKey,TValue>.Values
IEnumerable.GetEnumerator()
IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator()
IList.Add(Object)
IList.Contains(Object)
IList.IndexOf(Object)
IList.Insert(Int32, Object)
IList.IsFixedSize
IList.IsReadOnly
IList.Item[Int32]
IList.Remove(Object)
IList<KeyValuePair<TKey,TValue>>.IndexOf(KeyValuePair<TKey,TValue>)
IList<KeyValuePair<TKey,TValue>>.Insert(Int32, KeyValuePair<TKey,TValue>)
IList<KeyValuePair<TKey,TValue>>.Item[Int32]
IReadOnlyDictionary<TKey,TValue>.Keys
IReadOnlyDictionary<TKey,TValue>.Values
IReadOnlyList<KeyValuePair<TKey,TValue>>.Item[Int32]

扩展方法

ToFrozenDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根据指定的键选择器函数从 IEnumerable<T> 创建 FrozenDictionary<TKey,TValue>

ToFrozenDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

根据指定的键选择器和元素选择器函数从 IEnumerable<T> 创建 FrozenDictionary<TKey,TValue>

ToFrozenSet<T>(IEnumerable<T>, IEqualityComparer<T>)

创建具有指定值的 FrozenSet<T>

AsReadOnly<T>(IList<T>)

返回指定列表的只读 ReadOnlyCollection<T> 包装器。

AsReadOnly<TKey,TValue>(IDictionary<TKey,TValue>)

返回当前字典的只读 ReadOnlyDictionary<TKey,TValue> 包装器。

GetValueOrDefault<TKey,TValue>(IReadOnlyDictionary<TKey,TValue>, TKey)

尝试获取与 dictionary中指定的 key 关联的值。

GetValueOrDefault<TKey,TValue>(IReadOnlyDictionary<TKey,TValue>, TKey, TValue)

尝试获取与 dictionary中指定的 key 关联的值。

Remove<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

尝试从 dictionary中删除具有指定 key 的值。

TryAdd<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

尝试将指定的 keyvalue 添加到 dictionary

ToImmutableArray<TSource>(IEnumerable<TSource>)

从指定的集合创建不可变数组。

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

从现有元素集合构造不可变字典,将转换函数应用于源键。

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

基于序列的某些转换构造不可变字典。

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

枚举和转换序列,并生成其内容的不可变字典。

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)

枚举和转换序列,并使用指定的键比较器生成其内容的不可变字典。

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

枚举和转换序列,并使用指定的键和值比较器生成其内容的不可变字典。

ToImmutableHashSet<TSource>(IEnumerable<TSource>)

枚举序列并生成其内容的不可变哈希集。

ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

枚举序列,生成其内容的不可变哈希集,并为集类型使用指定的相等比较器。

ToImmutableList<TSource>(IEnumerable<TSource>)

枚举序列并生成其内容的不可变列表。

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

枚举和转换序列,并生成其内容的不可变排序字典。

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>)

枚举和转换序列,并使用指定的键比较器生成其内容的不可变排序字典。

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

枚举和转换序列,并使用指定的键和值比较器生成其内容的不可变排序字典。

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

枚举序列并生成其内容的不可变排序集。

ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>)

枚举序列,生成其内容的不可变排序集,并使用指定的比较器。

CopyToDataTable<T>(IEnumerable<T>)

返回一个包含 DataRow 对象副本的 DataTable,给定 IEnumerable<T> 对象的输入 IEnumerable<T> 对象,其中泛型参数 TDataRow

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

给定泛型参数 TDataRow的输入 IEnumerable<T> 对象,将 DataRow 对象复制到指定的 DataTable

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

给定泛型参数 TDataRow的输入 IEnumerable<T> 对象,将 DataRow 对象复制到指定的 DataTable

Aggregate<TSource>(IEnumerable<TSource>, Func<TSource,TSource,TSource>)

对序列应用累加器函数。

Aggregate<TSource,TAccumulate>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>)

对序列应用累加器函数。 指定的种子值用作初始累加器值。

Aggregate<TSource,TAccumulate,TResult>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, Func<TAccumulate,TResult>)

对序列应用累加器函数。 指定的种子值用作初始累加器值,并且指定函数用于选择结果值。

AggregateBy<TSource,TKey,TAccumulate>(IEnumerable<TSource>, Func<TSource, TKey>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, IEqualityComparer<TKey>)
AggregateBy<TSource,TKey,TAccumulate>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TKey,TAccumulate>, Func<TAccumulate,TSource,TAccumulate>, IEqualityComparer<TKey>)
All<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

确定序列的所有元素是否满足条件。

Any<TSource>(IEnumerable<TSource>)

确定序列是否包含任何元素。

Any<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

确定序列的任何元素是否满足条件。

Append<TSource>(IEnumerable<TSource>, TSource)

将值追加到序列的末尾。

AsEnumerable<TSource>(IEnumerable<TSource>)

返回类型化为 IEnumerable<T>的输入。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

计算通过对输入序列的每个元素调用转换函数获得的 Decimal 值的序列的平均值。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

计算通过对输入序列的每个元素调用转换函数获得的 Double 值的序列的平均值。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

计算通过对输入序列的每个元素调用转换函数获得的 Int32 值的序列的平均值。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

计算通过对输入序列的每个元素调用转换函数获得的 Int64 值的序列的平均值。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

计算一系列可为 null 的 Decimal 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

计算一系列可为 null 的 Double 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

计算一系列可为 null 的 Int32 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

计算一系列可为 null 的 Int64 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

计算一系列可为 null 的 Single 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

计算通过对输入序列的每个元素调用转换函数获得的 Single 值的序列的平均值。

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定类型。

Chunk<TSource>(IEnumerable<TSource>, Int32)

将序列的元素拆分为大小块,最多 size

Concat<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

连接两个序列。

Contains<TSource>(IEnumerable<TSource>, TSource)

使用默认相等比较器确定序列是否包含指定的元素。

Contains<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>)

确定序列是否使用指定的 IEqualityComparer<T>包含指定的元素。

Count<TSource>(IEnumerable<TSource>)

返回序列中的元素数。

Count<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回一个数字,该值代表指定序列中满足条件的元素数。

CountBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)
DefaultIfEmpty<TSource>(IEnumerable<TSource>)

如果序列为空,则返回指定序列的元素或类型参数在单一实例集合中的默认值。

DefaultIfEmpty<TSource>(IEnumerable<TSource>, TSource)

如果序列为空,则返回指定序列的元素或单个实例集合中的指定值。

Distinct<TSource>(IEnumerable<TSource>)

通过使用默认相等比较器比较值,从序列中返回不同的元素。

Distinct<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

通过使用指定的 IEqualityComparer<T> 来比较值,从序列中返回不同的元素。

DistinctBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

根据指定的键选择器函数返回序列中的不同元素。

DistinctBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根据指定的键选择器函数并使用指定的比较器比较键,从序列中返回不同的元素。

ElementAt<TSource>(IEnumerable<TSource>, Index)

返回序列中指定索引处的元素。

ElementAt<TSource>(IEnumerable<TSource>, Int32)

返回序列中指定索引处的元素。

ElementAtOrDefault<TSource>(IEnumerable<TSource>, Index)

返回序列中指定索引处的元素;如果索引范围不足,则返回默认值。

ElementAtOrDefault<TSource>(IEnumerable<TSource>, Int32)

返回序列中指定索引处的元素;如果索引范围不足,则返回默认值。

Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

使用默认相等比较器来比较值,生成两个序列的集差。

Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

通过使用指定的 IEqualityComparer<T> 来比较值,生成两个序列的集差异。

ExceptBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>)

根据指定的键选择器函数生成两个序列的集差异。

ExceptBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根据指定的键选择器函数生成两个序列的集差异。

First<TSource>(IEnumerable<TSource>)

返回序列的第一个元素。

First<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足指定条件的序列中的第一个元素。

FirstOrDefault<TSource>(IEnumerable<TSource>)

返回序列的第一个元素;如果序列不包含任何元素,则返回默认值。

FirstOrDefault<TSource>(IEnumerable<TSource>, TSource)

返回序列的第一个元素;如果序列不包含任何元素,则返回指定的默认值。

FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足条件的序列的第一个元素;如果未找到此类元素,则返回默认值。

FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

返回满足条件的序列的第一个元素;如果未找到此类元素,则返回指定的默认值。

GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

根据指定的键选择器函数对序列的元素进行分组。

GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根据指定的键选择器函数对序列的元素进行分组,并使用指定的比较器比较键。

GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

根据指定的键选择器函数对序列的元素进行分组,并使用指定的函数投影每个组的元素。

GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

根据键选择器函数对序列的元素进行分组。 通过使用比较器比较键,并且每个组的元素都通过使用指定的函数进行投影。

GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>)

根据指定的键选择器函数对序列的元素进行分组,并从每个组及其键创建结果值。

GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>, IEqualityComparer<TKey>)

根据指定的键选择器函数对序列的元素进行分组,并从每个组及其键创建结果值。 使用指定的比较器比较键。

GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>,TResult>)

根据指定的键选择器函数对序列的元素进行分组,并从每个组及其键创建结果值。 每个组的元素是使用指定的函数投影的。

GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>, TResult>, IEqualityComparer<TKey>)

根据指定的键选择器函数对序列的元素进行分组,并从每个组及其键创建结果值。 使用指定的比较器比较键值,并且每个组的元素都通过使用指定的函数进行投影。

GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>, TResult>)

根据键的相等性关联两个序列的元素,并对结果进行分组。 默认相等比较器用于比较键。

GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>, TResult>, IEqualityComparer<TKey>)

根据键相等性关联两个序列的元素,并对结果进行分组。 指定的 IEqualityComparer<T> 用于比较键。

Index<TSource>(IEnumerable<TSource>)
Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

通过使用默认相等比较器来比较值,生成两个序列的集交集。

Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

通过使用指定的 IEqualityComparer<T> 来比较值,生成两个序列的集交集。

IntersectBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>)

根据指定的键选择器函数生成两个序列的集交集。

IntersectBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根据指定的键选择器函数生成两个序列的集交集。

Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>)

根据匹配键关联两个序列的元素。 默认相等比较器用于比较键。

Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)

根据匹配键关联两个序列的元素。 指定的 IEqualityComparer<T> 用于比较键。

Last<TSource>(IEnumerable<TSource>)

返回序列的最后一个元素。

Last<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足指定条件的序列的最后一个元素。

LastOrDefault<TSource>(IEnumerable<TSource>)

返回序列的最后一个元素;如果序列不包含任何元素,则返回默认值。

LastOrDefault<TSource>(IEnumerable<TSource>, TSource)

返回序列的最后一个元素;如果序列不包含任何元素,则返回指定的默认值。

LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足条件的序列的最后一个元素;如果未找到此类元素,则返回默认值。

LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

返回满足条件的序列的最后一个元素;如果未找到此类元素,则返回指定的默认值。

LongCount<TSource>(IEnumerable<TSource>)

返回一个表示序列中元素总数的 Int64

LongCount<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回表示序列中满足条件的元素数的 Int64

Max<TSource>(IEnumerable<TSource>)

返回泛型序列中的最大值。

Max<TSource>(IEnumerable<TSource>, IComparer<TSource>)

返回泛型序列中的最大值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

对序列的每个元素调用转换函数,并返回最大 Decimal 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

对序列的每个元素调用转换函数,并返回最大 Double 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

对序列的每个元素调用转换函数,并返回最大 Int32 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

对序列的每个元素调用转换函数,并返回最大 Int64 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

对序列的每个元素调用转换函数,并返回最大可为 null Decimal 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

对序列的每个元素调用转换函数,并返回最大可为 null Double 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

对序列的每个元素调用转换函数,并返回最大可为 null Int32 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

对序列的每个元素调用转换函数,并返回最大可为 null Int64 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

对序列的每个元素调用转换函数,并返回最大可为 null Single 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

对序列的每个元素调用转换函数,并返回最大 Single 值。

Max<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

对泛型序列的每个元素调用转换函数,并返回得到的最大值。

MaxBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

根据指定的键选择器函数返回泛型序列中的最大值。

MaxBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

根据指定的键选择器函数和键比较器返回泛型序列中的最大值。

Min<TSource>(IEnumerable<TSource>)

返回泛型序列中的最小值。

Min<TSource>(IEnumerable<TSource>, IComparer<TSource>)

返回泛型序列中的最小值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

对序列的每个元素调用转换函数,并返回最小 Decimal 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

对序列的每个元素调用转换函数,并返回最小 Double 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

对序列的每个元素调用转换函数,并返回最小 Int32 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

对序列的每个元素调用转换函数,并返回最小 Int64 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Decimal 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Double 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Int32 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Int64 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Single 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

对序列的每个元素调用转换函数,并返回最小 Single 值。

Min<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

对泛型序列的每个元素调用转换函数,并返回生成的最小值。

MinBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

根据指定的键选择器函数返回泛型序列中的最小值。

MinBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

根据指定的键选择器函数和键比较器返回泛型序列中的最小值。

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。

Order<T>(IEnumerable<T>)

按升序对序列的元素进行排序。

Order<T>(IEnumerable<T>, IComparer<T>)

按升序对序列的元素进行排序。

OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

根据键按升序对序列的元素进行排序。

OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

使用指定的比较器按升序对序列的元素进行排序。

OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

根据键按降序对序列的元素进行排序。

OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

使用指定的比较器按降序对序列的元素进行排序。

OrderDescending<T>(IEnumerable<T>)

按降序对序列的元素进行排序。

OrderDescending<T>(IEnumerable<T>, IComparer<T>)

按降序对序列的元素进行排序。

Prepend<TSource>(IEnumerable<TSource>, TSource)

将值添加到序列的开头。

Reverse<TSource>(IEnumerable<TSource>)

反转序列中元素的顺序。

Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

将序列的每个元素投影到一个新窗体中。

Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,TResult>)

通过合并元素的索引,将序列的每个元素投影到一个新窗体中。

SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TResult>>)

将序列的每个元素投影到 IEnumerable<T>,并将生成的序列平展为一个序列。

SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TResult>>)

将序列的每个元素投影到 IEnumerable<T>,并将生成的序列平展为一个序列。 每个源元素的索引用于该元素的投影形式。

SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

将序列的每个元素投影到 IEnumerable<T>,将生成的序列平展为一个序列,并在其中的每个元素上调用结果选择器函数。

SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

将序列的每个元素投影到 IEnumerable<T>,将生成的序列平展为一个序列,并在其中的每个元素上调用结果选择器函数。 每个源元素的索引用于该元素的中间投影形式。

SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

通过使用其类型的默认相等比较器,确定两个序列是否相等。

SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

通过使用指定的 IEqualityComparer<T>,确定两个序列是否相等。

Single<TSource>(IEnumerable<TSource>)

返回序列的唯一元素,如果序列中没有完全有一个元素,则会引发异常。

Single<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足指定条件的序列的唯一元素,如果存在多个此类元素,则会引发异常。

SingleOrDefault<TSource>(IEnumerable<TSource>)

返回序列的唯一元素;如果序列为空,则返回默认值;如果序列中有多个元素,此方法将引发异常。

SingleOrDefault<TSource>(IEnumerable<TSource>, TSource)

返回序列的唯一元素;如果序列为空,则返回指定的默认值;如果序列中有多个元素,此方法将引发异常。

SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足指定条件的序列的唯一元素;如果没有此类元素,则返回默认值;如果多个元素满足条件,此方法将引发异常。

SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

返回满足指定条件的序列的唯一元素;如果没有此类元素,则返回指定的默认值;如果多个元素满足条件,此方法将引发异常。

Skip<TSource>(IEnumerable<TSource>, Int32)

绕过序列中的指定数量的元素,然后返回其余元素。

SkipLast<TSource>(IEnumerable<TSource>, Int32)

返回一个新的可枚举集合,该集合包含 source 的元素,其中省略了源集合的最后一个 count 元素。

SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

只要指定条件为 true,即可绕过序列中的元素,然后返回其余元素。

SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

只要指定条件为 true,即可绕过序列中的元素,然后返回其余元素。 元素的索引用于谓词函数的逻辑。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

计算通过对输入序列的每个元素调用转换函数获得的 Decimal 值序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

计算通过对输入序列的每个元素调用转换函数获得的 Double 值序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

计算通过对输入序列的每个元素调用转换函数获得的 Int32 值序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

计算通过对输入序列的每个元素调用转换函数获得的 Int64 值序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Decimal 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Double 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Int32 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Int64 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Single 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

计算通过对输入序列的每个元素调用转换函数获得的 Single 值序列的总和。

Take<TSource>(IEnumerable<TSource>, Int32)

从序列的开头返回指定的连续元素数。

Take<TSource>(IEnumerable<TSource>, Range)

返回序列中连续元素的指定范围。

TakeLast<TSource>(IEnumerable<TSource>, Int32)

返回一个新的可枚举集合,该集合包含来自 source的最后一个 count 元素。

TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

只要指定的条件为 true,就从序列中返回元素。

TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

只要指定的条件为 true,就从序列中返回元素。 元素的索引用于谓词函数的逻辑。

ToArray<TSource>(IEnumerable<TSource>)

IEnumerable<T>创建数组。

ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

根据指定的键选择器函数从 IEnumerable<T> 创建 Dictionary<TKey,TValue>

ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根据指定的键选择器函数和键比较器从 IEnumerable<T> 创建 Dictionary<TKey,TValue>

ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

根据指定的键选择器和元素选择器函数从 IEnumerable<T> 创建 Dictionary<TKey,TValue>

ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

根据指定的键选择器函数、比较器和元素选择器函数从 IEnumerable<T> 创建 Dictionary<TKey,TValue>

ToHashSet<TSource>(IEnumerable<TSource>)

IEnumerable<T>创建 HashSet<T>

ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

使用 comparer 比较键从 IEnumerable<T> 创建 HashSet<T>

ToList<TSource>(IEnumerable<TSource>)

IEnumerable<T>创建 List<T>

ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

根据指定的键选择器函数从 IEnumerable<T> 创建 Lookup<TKey,TElement>

ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根据指定的键选择器函数和键比较器从 IEnumerable<T> 创建 Lookup<TKey,TElement>

ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

根据指定的键选择器和元素选择器函数从 IEnumerable<T> 创建 Lookup<TKey,TElement>

ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

根据指定的键选择器函数、比较器和元素选择器函数从 IEnumerable<T> 创建 Lookup<TKey,TElement>

TryGetNonEnumeratedCount<TSource>(IEnumerable<TSource>, Int32)

尝试在不强制枚举的情况下确定序列中的元素数。

Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

使用默认相等比较器生成两个序列的集并集。

Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

使用指定的 IEqualityComparer<T>生成两个序列的集并集。

UnionBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource,TKey>)

根据指定的键选择器函数生成两个序列的集并集。

UnionBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根据指定的键选择器函数生成两个序列的集并集。

Where<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

根据谓词筛选值序列。

Where<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

根据谓词筛选值序列。 每个元素的索引都在谓词函数的逻辑中使用。

Zip<TFirst,TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>)

生成包含两个指定序列中的元素的元组序列。

Zip<TFirst,TSecond,TThird>(IEnumerable<TFirst>, IEnumerable<TSecond>, IEnumerable<TThird>)

生成包含三个指定序列中的元素的元组序列。

Zip<TFirst,TSecond,TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)

将指定的函数应用于两个序列的相应元素,从而生成结果序列。

AsParallel(IEnumerable)

启用查询的并行化。

AsParallel<TSource>(IEnumerable<TSource>)

启用查询的并行化。

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryable

AsQueryable<TElement>(IEnumerable<TElement>)

将泛型 IEnumerable<T> 转换为泛型 IQueryable<T>

Ancestors<T>(IEnumerable<T>)

返回一个元素集合,其中包含源集合中每个节点的上级。

Ancestors<T>(IEnumerable<T>, XName)

返回一个筛选的元素集合,其中包含源集合中每个节点的上级。 集合中仅包含具有匹配 XName 的元素。

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。

Descendants<T>(IEnumerable<T>)

返回一个元素集合,其中包含源集合中每个元素和文档的子代元素。

Descendants<T>(IEnumerable<T>, XName)

返回一个筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。 集合中仅包含具有匹配 XName 的元素。

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。

Elements<T>(IEnumerable<T>, XName)

返回源集合中每个元素和文档的子元素的筛选集合。 集合中仅包含具有匹配 XName 的元素。

InDocumentOrder<T>(IEnumerable<T>)

返回一个节点集合,其中包含源集合中的所有节点,按文档顺序排序。

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点的集合。

Remove<T>(IEnumerable<T>)

从源集合的父节点中删除每个节点。

适用于