ImmutableArrayExtensions.SequenceEqual 方法

定义

重载

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, IEnumerable<TDerived>, IEqualityComparer<TBase>)

根据相等比较器确定两个序列是否相等。Determines whether two sequences are equal according to an equality comparer.

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, IEqualityComparer<TBase>)

根据相等比较器确定两个序列是否相等。Determines whether two sequences are equal according to an equality comparer.

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, Func<TBase,TBase,Boolean>)

根据相等比较器确定两个序列是否相等。Determines whether two sequences are equal according to an equality comparer.

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, IEnumerable<TDerived>, IEqualityComparer<TBase>)

根据相等比较器确定两个序列是否相等。Determines whether two sequences are equal according to an equality comparer.

public static bool SequenceEqual<TDerived,TBase> (this System.Collections.Immutable.ImmutableArray<TBase> immutableArray, System.Collections.Generic.IEnumerable<TDerived> items, System.Collections.Generic.IEqualityComparer<TBase> comparer = default) where TDerived : TBase;
public static bool SequenceEqual<TDerived,TBase> (this System.Collections.Immutable.ImmutableArray<TBase>? immutableArray, System.Collections.Generic.IEnumerable<TDerived> items, System.Collections.Generic.IEqualityComparer<TBase>? comparer = default) where TDerived : TBase;
static member SequenceEqual : System.Collections.Immutable.ImmutableArray<'Base> * seq<#'Base> * System.Collections.Generic.IEqualityComparer<'Base> -> bool
<Extension()>
Public Function SequenceEqual(Of TDerived As TBase, TBase As TBase) (immutableArray As ImmutableArray(Of TBase), items As IEnumerable(Of TDerived), Optional comparer As IEqualityComparer(Of TBase) = Nothing) As Boolean

类型参数

TDerived

要比较的数组中元素的类型。The type of element in the compared array.

TBase

集合包含的元素的类型。The type of element contained by the collection.

参数

immutableArray
ImmutableArray<TBase>

用于比较的数组。The array to use for comparison.

items
IEnumerable<TDerived>

用于比较的项。The items to use for comparison.

comparer
IEqualityComparer<TBase>

用于检查相等性的比较器。The comparer to use to check for equality.

返回

Boolean

如果指示序列相等,则为 true;否则为 falsetrue to indicate the sequences are equal; otherwise, false.

适用于

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, IEqualityComparer<TBase>)

根据相等比较器确定两个序列是否相等。Determines whether two sequences are equal according to an equality comparer.

public static bool SequenceEqual<TDerived,TBase> (this System.Collections.Immutable.ImmutableArray<TBase> immutableArray, System.Collections.Immutable.ImmutableArray<TDerived> items, System.Collections.Generic.IEqualityComparer<TBase> comparer = default) where TDerived : TBase;
public static bool SequenceEqual<TDerived,TBase> (this System.Collections.Immutable.ImmutableArray<TBase>? immutableArray, System.Collections.Immutable.ImmutableArray<TDerived>? items, System.Collections.Generic.IEqualityComparer<TBase>? comparer = default) where TDerived : TBase;
static member SequenceEqual : System.Collections.Immutable.ImmutableArray<'Base> * System.Collections.Immutable.ImmutableArray<#'Base> * System.Collections.Generic.IEqualityComparer<'Base> -> bool
<Extension()>
Public Function SequenceEqual(Of TDerived As TBase, TBase As TBase) (immutableArray As ImmutableArray(Of TBase), items As ImmutableArray(Of TDerived), Optional comparer As IEqualityComparer(Of TBase) = Nothing) As Boolean

类型参数

TDerived

要比较的数组中元素的类型。The type of element in the compared array.

TBase

集合包含的元素的类型。The type of element contained by the collection.

参数

immutableArray
ImmutableArray<TBase>

用于比较的数组。The array to use for comparison.

items
ImmutableArray<TDerived>

用于比较的项。The items to use for comparison.

comparer
IEqualityComparer<TBase>

用于检查相等性的比较器。The comparer to use to check for equality.

返回

Boolean

如果指示序列相等,则为 true;否则为 falsetrue to indicate the sequences are equal; otherwise, false.

适用于

SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, Func<TBase,TBase,Boolean>)

根据相等比较器确定两个序列是否相等。Determines whether two sequences are equal according to an equality comparer.

public:
generic <typename TDerived, typename TBase>
 where TDerived : TBase[System::Runtime::CompilerServices::Extension]
 static bool SequenceEqual(System::Collections::Immutable::ImmutableArray<TBase> immutableArray, System::Collections::Immutable::ImmutableArray<TDerived> items, Func<TBase, TBase, bool> ^ predicate);
public static bool SequenceEqual<TDerived,TBase> (this System.Collections.Immutable.ImmutableArray<TBase> immutableArray, System.Collections.Immutable.ImmutableArray<TDerived> items, Func<TBase,TBase,bool> predicate) where TDerived : TBase;
public static bool SequenceEqual<TDerived,TBase> (this System.Collections.Immutable.ImmutableArray<TBase>? immutableArray, System.Collections.Immutable.ImmutableArray<TDerived>? items, Func<TBase,TBase,bool> predicate) where TDerived : TBase;
static member SequenceEqual : System.Collections.Immutable.ImmutableArray<'Base> * System.Collections.Immutable.ImmutableArray<#'Base> * Func<'Base, 'Base, bool> -> bool
<Extension()>
Public Function SequenceEqual(Of TDerived As TBase, TBase As TBase) (immutableArray As ImmutableArray(Of TBase), items As ImmutableArray(Of TDerived), predicate As Func(Of TBase, TBase, Boolean)) As Boolean

类型参数

TDerived

要比较的数组中元素的类型。The type of element in the compared array.

TBase

集合包含的元素的类型。The type of element contained by the collection.

参数

immutableArray
ImmutableArray<TBase>

用于比较的数组。The array to use for comparison.

items
ImmutableArray<TDerived>

用于比较的项。The items to use for comparison.

predicate
Func<TBase,TBase,Boolean>

用于检查相等性的比较器。The comparer to use to check for equality.

返回

Boolean

如果指示序列相等,则为 true;否则为 falsetrue to indicate the sequences are equal; otherwise, false.

适用于