MemoryExtensions.Overlaps Method (System) (original) (raw)

Definition

Namespace:

System

Assemblies:

netstandard.dll, System.Memory.dll

Assembly:

System.Memory.dll

Assembly:

netstandard.dll

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Overlaps(ReadOnlySpan, ReadOnlySpan)

Source:

MemoryExtensions.cs

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

Returns

true if the two sequences overlap; otherwise, false.

Applies to

Overlaps(Span, ReadOnlySpan)

Source:

MemoryExtensions.cs

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);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other);
public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other);
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member Overlaps : Span<'T> * ReadOnlySpan<'T> -> bool
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

Returns

true if the two sequences overlap; otherwise, false.

Attributes

Applies to

Overlaps(ReadOnlySpan, ReadOnlySpan, Int32)

Source:

MemoryExtensions.cs

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

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(Span, ReadOnlySpan, Int32)

Source:

MemoryExtensions.cs

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);
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other, out int elementOffset);
public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other, out int elementOffset);
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member Overlaps : Span<'T> * ReadOnlySpan<'T> * int -> bool
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

The first 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.

Attributes

Applies to