ImmutableArrayExtensions.SequenceEqual Method

Definition

Overloads

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>)

Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs

Determines whether two sequences are equal according to an equality comparer.

C#
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;
C#
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;

Type Parameters

TDerived

The type of element in the compared array.

TBase

The type of element contained by the collection.

Parameters

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.

Returns

true to indicate the sequences are equal; otherwise, false.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)
UWP 10.0

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

Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs

Determines whether two sequences are equal according to an equality comparer.

C#
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;
C#
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;

Type Parameters

TDerived

The type of element in the compared array.

TBase

The type of element contained by the collection.

Parameters

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.

Returns

true to indicate the sequences are equal; otherwise, false.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)
UWP 10.0

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

Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs
Source:
ImmutableArrayExtensions.cs

Determines whether two sequences are equal according to an equality comparer.

C#
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;

Type Parameters

TDerived

The type of element in the compared array.

TBase

The type of element contained by the collection.

Parameters

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.

Returns

true to indicate the sequences are equal; otherwise, false.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)
UWP 10.0