ImmutableArrayExtensions.SequenceEqual 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, IEnumerable<TDerived>, IEqualityComparer<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;
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
比較陣列中元素的類型。
- TBase
集合所包含之元素的類型。
參數
- immutableArray
- ImmutableArray<TBase>
要用於比較的陣列。
- items
- IEnumerable<TDerived>
要用於比較的項目。
- comparer
- IEqualityComparer<TBase>
用來檢查相等的比較子。
傳回
true
表示序列相等,否則為 false
。
適用於
SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, IEqualityComparer<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;
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
比較陣列中元素的類型。
- TBase
集合所包含之元素的類型。
參數
- immutableArray
- ImmutableArray<TBase>
要用於比較的陣列。
- items
- ImmutableArray<TDerived>
要用於比較的項目。
- comparer
- IEqualityComparer<TBase>
用來檢查相等的比較子。
傳回
true
表示序列相等,否則為 false
。
適用於
SequenceEqual<TDerived,TBase>(ImmutableArray<TBase>, ImmutableArray<TDerived>, Func<TBase,TBase,Boolean>)
根據相等比較子,判斷兩個序列是否相等。
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;
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
比較陣列中元素的類型。
- TBase
集合所包含之元素的類型。
參數
- immutableArray
- ImmutableArray<TBase>
要用於比較的陣列。
- items
- ImmutableArray<TDerived>
要用於比較的項目。
傳回
true
表示序列相等,否則為 false
。