MemoryExtensions.SequenceEqual MemoryExtensions.SequenceEqual MemoryExtensions.SequenceEqual MemoryExtensions.SequenceEqual Method

定義

オーバーロード

SequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) SequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) SequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) SequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

IEquatable{T}.Equals(T) を使用して要素を比較することで、2 つの読み取り専用シーケンスが等しいかどうかを判断します。Determines whether two read-only sequences are equal by comparing the elements using IEquatable{T}.Equals(T).

SequenceEqual<T>(Span<T>, ReadOnlySpan<T>) SequenceEqual<T>(Span<T>, ReadOnlySpan<T>) SequenceEqual<T>(Span<T>, ReadOnlySpan<T>) SequenceEqual<T>(Span<T>, ReadOnlySpan<T>)

IEquatable{T}.Equals(T) を使用して要素を比較することで、スパンと読み取り専用スパンが等しいかどうかを判断します。Determines whether a span and a read-only span are equal by comparing the elements using IEquatable{T}.Equals(T).

SequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) SequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) SequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) SequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

IEquatable{T}.Equals(T) を使用して要素を比較することで、2 つの読み取り専用シーケンスが等しいかどうかを判断します。Determines whether two read-only sequences are equal by comparing the elements using IEquatable{T}.Equals(T).

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static bool SequenceEqual(ReadOnlySpan<T> span, ReadOnlySpan<T> other);
public static bool SequenceEqual<T> (this ReadOnlySpan<T> span, ReadOnlySpan<T> other) where T : IEquatable<T>;
static member SequenceEqual : ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function SequenceEqual(Of T As IEquatable(Of T)) (span As ReadOnlySpan(Of T), other As ReadOnlySpan(Of T)) As Boolean

型パラメーター

T

シーケンス内の要素の型。The type of elements in the sequence.

パラメーター

span
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

比較する最初のシーケンス。The first sequence to compare.

other
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

比較する 2 番目のシーケンス。The second sequence to compare.

戻り値

2 つのシーケンスが等しい場合は true、それ以外の場合は falsetrue if the two sequences are equal; otherwise, false.

SequenceEqual<T>(Span<T>, ReadOnlySpan<T>) SequenceEqual<T>(Span<T>, ReadOnlySpan<T>) SequenceEqual<T>(Span<T>, ReadOnlySpan<T>) SequenceEqual<T>(Span<T>, ReadOnlySpan<T>)

IEquatable{T}.Equals(T) を使用して要素を比較することで、スパンと読み取り専用スパンが等しいかどうかを判断します。Determines whether a span and a read-only span are equal by comparing the elements using IEquatable{T}.Equals(T).

public:
generic <typename T>
 where T : IEquatable<T>[System::Runtime::CompilerServices::Extension]
 static bool SequenceEqual(Span<T> span, ReadOnlySpan<T> other);
public static bool SequenceEqual<T> (this Span<T> span, ReadOnlySpan<T> other) where T : IEquatable<T>;
static member SequenceEqual : Span<'T (requires 'T :> IEquatable<'T>)> * ReadOnlySpan<'T (requires 'T :> IEquatable<'T>)> -> bool (requires 'T :> IEquatable<'T>)
<Extension()>
Public Function SequenceEqual(Of T As IEquatable(Of T)) (span As Span(Of T), other As ReadOnlySpan(Of T)) As Boolean

型パラメーター

T

シーケンス内の要素の型。The type of elements in the sequence.

パラメーター

span
Span<T> Span<T> Span<T> Span<T>

比較対象とするスパン。The span to compare.

other
ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T> ReadOnlySpan<T>

比較する読み取り専用スパン。The read-only span to compare.

戻り値

2 つのシーケンスが等しい場合は true、それ以外の場合は falsetrue if the two sequences are equal; otherwise, false.

適用対象