Represents a contiguous region of memory.
generic <typename T>
public value class Memory : IEquatable<Memory<T>>
generic <typename T>
public value class Memory
public readonly struct Memory<T> : IEquatable<Memory<T>>
public readonly struct Memory<T>
type Memory<'T> = struct
Public Structure Memory(Of T)
Implements IEquatable(Of Memory(Of T))
Public Structure Memory(Of T)
Type Parameters
Like Span<T>, Memory<T>
represents a contiguous region of memory. Unlike Span<T>, however, Memory<T>
is not a ref struct. This means that Memory<T>
can be placed on the managed heap, whereas Span<T> cannot. As a result, the Memory<T>
structure does not have the same restrictions as a Span<T> instance. In particular:
It can be used as a field in a class.
It can be used across await
and yield
boundaries.
In addition to Memory<T>
, you can use System.ReadOnlyMemory<T> to represent immutable or read-only memory.
Returns an empty Memory<T> object.
IsEmptyIndicates whether the current instance is empty.
LengthGets the number of items in the current instance.
SpanReturns a span from the current instance.
Methods Operators Extension Methods See alsoCollaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4