Edytuj

Udostępnij za pośrednictwem


MemoryExtensions Class

Definition

Helpers for working with the Memory<T> type.

public static class MemoryExtensions
type MemoryExtensions = class
Public Module MemoryExtensions
Inheritance
MemoryExtensions

Methods

AsBytes<T>(Memory<T>)

Casts a Memory<T> of one primitive type T to Memory<T> of bytes.

AsMemory2D<T>(Memory<T>, Int32, Int32, Int32, Int32)

Returns a Memory2D<T> instance wrapping the underlying data for the given Memory<T> instance.

AsMemory2D<T>(Memory<T>, Int32, Int32)

Returns a Memory2D<T> instance wrapping the underlying data for the given Memory<T> instance.

AsStream(Memory<Byte>)

Returns a Stream wrapping the contents of the given Memory<T> of Byte instance.

Cast<TFrom,TTo>(Memory<TFrom>)

Casts a Memory<T> of one primitive type TFrom to another primitive type TTo.

Applies to