MemoryExtensions.Overlaps MemoryExtensions.Overlaps MemoryExtensions.Overlaps MemoryExtensions.Overlaps Method

定义

重载

Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

确定两个只读序列是否在内存中重叠。Determines whether two read-only sequences overlap in memory.

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

确定跨度和只读跨度是否在内存中重叠。Determines whether a span and a read-only span overlap in memory.

Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Int32)

确定两个只读序列是否在内存中重叠且输出元素偏移。Determines whether two read-only sequences overlap in memory and outputs the element offset.

Overlaps<T>(Span<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(Span<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(Span<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(Span<T>, ReadOnlySpan<T>, Int32)

确定跨度和只读跨度是否在内存中重叠且输出元素偏移。Determines whether a span and a read-only span overlap in memory and outputs the element offset.

Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>)

确定两个只读序列是否在内存中重叠。Determines whether two read-only sequences overlap in memory.

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

类型参数

T

只读序列中要的类型。The type of elmeents in the read-only sequence.

参数

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

第一个序列。The first sequence.

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

第二个序列。The second sequence.

返回

如果两个序列重叠,则为 true;否则为 falsetrue if the two sequences overlap; otherwise, false.

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

确定跨度和只读跨度是否在内存中重叠。Determines whether a span and a read-only span overlap in memory.

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

类型参数

T

范围中元素的类型。The type of elements in the span.

参数

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.

返回

如果两个序列重叠,则为 true;否则为 falsetrue if the two sequences overlap; otherwise, false.

Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Int32)

确定两个只读序列是否在内存中重叠且输出元素偏移。Determines whether two read-only sequences overlap in memory and outputs the element offset.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static bool Overlaps(ReadOnlySpan<T> span, ReadOnlySpan<T> other, [Runtime::InteropServices::Out] int % elementOffset);
public static bool Overlaps<T> (this ReadOnlySpan<T> span, ReadOnlySpan<T> other, out int elementOffset);
static member Overlaps : ReadOnlySpan<'T> * ReadOnlySpan<'T> *  -> bool
<Extension()>
Public Function Overlaps(Of T) (span As ReadOnlySpan(Of T), other As ReadOnlySpan(Of T), ByRef elementOffset As Integer) As Boolean

类型参数

T

范围中元素的类型。The type of elements in the span.

参数

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

第一个序列。The first sequence.

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

第二个序列。The second sequence.

elementOffset
Int32 Int32 Int32 Int32

返回

如果两个序列重叠,则为 true;否则为 falsetrue if the two sequences overlap; otherwise, false.

Overlaps<T>(Span<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(Span<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(Span<T>, ReadOnlySpan<T>, Int32) Overlaps<T>(Span<T>, ReadOnlySpan<T>, Int32)

确定跨度和只读跨度是否在内存中重叠且输出元素偏移。Determines whether a span and a read-only span overlap in memory and outputs the element offset.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static bool Overlaps(Span<T> span, ReadOnlySpan<T> other, [Runtime::InteropServices::Out] int % elementOffset);
public static bool Overlaps<T> (this Span<T> span, ReadOnlySpan<T> other, out int elementOffset);
static member Overlaps : Span<'T> * ReadOnlySpan<'T> *  -> bool
<Extension()>
Public Function Overlaps(Of T) (span As Span(Of T), other As ReadOnlySpan(Of T), ByRef elementOffset As Integer) As Boolean

类型参数

T

范围中元素的类型。The type of elements in the span.

参数

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

要比较的第一个序列。The first sequence to compare.

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

要比较的第二个序列。The second sequence to compare.

elementOffset
Int32 Int32 Int32 Int32

方法返回时,包含 spanother 之间的偏移。When the method returns, contains the offset between span and other.

返回

如果两个序列重叠,则为 true;否则为 falsetrue if the two sequences overlap; otherwise, false.

适用于