System::Runtime::InteropServices::MemoryMarshal::AsMemory method

MemoryMarshal::AsMemory method

Casts a ReadOnlyMemory to mutable Memory.

template<typename T> static Memory<T> System::Runtime::InteropServices::MemoryMarshal::AsMemory(const ReadOnlyMemory<T> &memory)
ParameterDescription
TThe type of elements in the ReadOnlyMemory.
ParameterTypeDescription
memoryconst ReadOnlyMemory<T>&The ReadOnlyMemory to cast.

ReturnValue

A Memory object that represents the same memory as the ReadOnlyMemory.

See Also