Table of Contents

Class MemoryExtensions

Namespace
LfrlAnvil.Extensions
Assembly
LfrlAnvil.Core.dll

Contains Memory<T> extension methods.

public static class MemoryExtensions
Inheritance
MemoryExtensions
Inherited Members

Methods

GetEnumerator<T>(Memory<T>)

Returns an enumerator instance created from the given memory's Span.

[Pure]
public static Span<T>.Enumerator GetEnumerator<T>(this Memory<T> source)

Parameters

source Memory<T>

Source memory.

Returns

Span<T>.Enumerator

Underlying memory's span's enumerator.

Type Parameters

T

Memory element type.

GetEnumerator<T>(ReadOnlyMemory<T>)

Returns an enumerator instance created from the given memory's Span.

[Pure]
public static ReadOnlySpan<T>.Enumerator GetEnumerator<T>(this ReadOnlyMemory<T> source)

Parameters

source ReadOnlyMemory<T>

Read-only source memory.

Returns

ReadOnlySpan<T>.Enumerator

Underlying memory's span's enumerator.

Type Parameters

T

Memory element type.