Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


AsyncEnumerable.SequenceEqualAsync<TSource> Method

Definition

Determines whether two sequences are equal by comparing their elements.

C#
public static System.Threading.Tasks.ValueTask<bool> SequenceEqualAsync<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> first, System.Collections.Generic.IAsyncEnumerable<TSource> second, System.Collections.Generic.IEqualityComparer<TSource>? comparer = default, System.Threading.CancellationToken cancellationToken = default);

Type Parameters

TSource

Parameters

first
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> to compare to second.

second
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> to compare to the first sequence.

comparer
IEqualityComparer<TSource>

An IEqualityComparer<T> to use to compare elements.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

true if the two source sequences are of equal length and their corresponding elements compare equal according to comparer; otherwise, false.

Applies to

Termék Verziók
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided), 10
.NET Standard 2.0 (package-provided)