System::ReadOnlyMemory class

ReadOnlyMemory class

Represents a read-only memory segment backed by an array.

template<typename T>class ReadOnlyMemory : public System::Details::MemoryCore<T>

Methods

MethodDescription
static get_Empty()Gets an empty ReadOnlyMemory instance.
get_Span() constGets a read-only span that represents the current memory.
Slice(int32_t, int32_t) constCreates a slice of the current readonly memory.
static to_ReadOnlyMemory(const ArrayPtr<T>&)Creates a ReadOnlyMemory instance from the specified array.
ToString() constConverts the character read-only memory to a string representation.
ToString() constConverts the ordinary read-only memory to a string representation.

Remarks

Exposes a read-only span over the array region and supports slicing.

See Also