MemoryExtensions.Overlaps Method

Definition

Overloads

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

Determines whether two read-only sequences overlap in memory.

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)

Determines whether two read-only sequences overlap in memory and outputs the element offset.

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

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

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

Type Parameters

T

The type of elements in the read-only sequence.

Parameters

span
ReadOnlySpan<T>

The first sequence.

other
ReadOnlySpan<T>

The second sequence.

Returns

true if the two sequences overlap; otherwise, false.

Applies to

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

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

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

Type Parameters

T

The type of elements in the span.

Parameters

span
Span<T>

The span to compare.

other
ReadOnlySpan<T>

The read-only span to compare.

Returns

true if the two sequences overlap; otherwise, false.

Applies to

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

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

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> * int -> bool
<Extension()>
Public Function Overlaps(Of T) (span As ReadOnlySpan(Of T), other As ReadOnlySpan(Of T), ByRef elementOffset As Integer) As Boolean

Type Parameters

T

The type of elements in the span.

Parameters

span
ReadOnlySpan<T>

The first sequence.

other
ReadOnlySpan<T>

The second sequence.

elementOffset
Int32

When the method returns, contains the offset between span and other.

Returns

true if the two sequences overlap; otherwise, false.

Applies to

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

Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs
Source:
MemoryExtensions.cs

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> * int -> bool
<Extension()>
Public Function Overlaps(Of T) (span As Span(Of T), other As ReadOnlySpan(Of T), ByRef elementOffset As Integer) As Boolean

Type Parameters

T

The type of elements in the span.

Parameters

span
Span<T>

The first sequence to compare.

other
ReadOnlySpan<T>

The second sequence to compare.

elementOffset
Int32

When the method returns, contains the offset between span and other.

Returns

true if the two sequences overlap; otherwise, false.

Applies to