ReadOnlyMemoryExtensions Class

Definition

Helpers for working with the ReadOnlyMemory<T> type.

C#
public static class ReadOnlyMemoryExtensions
Inheritance
ReadOnlyMemoryExtensions

Methods

AsBytes<T>(ReadOnlyMemory<T>)

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

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

Returns a ReadOnlyMemory2D<T> instance wrapping the underlying data for the given ReadOnlyMemory<T> instance.

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

Returns a ReadOnlyMemory2D<T> instance wrapping the underlying data for the given ReadOnlyMemory<T> instance.

AsStream(ReadOnlyMemory<Byte>)

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

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

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

Applies to

Product Versions
Windows Community Toolkit 7.0.0, 7.1.0