A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.memory-1 below:

Memory<T> Struct (System) | Microsoft Learn

Memory<T> Struct Definition

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
Inheritance
Implements

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:

In addition to Memory<T>, you can use System.ReadOnlyMemory<T> to represent immutable or read-only memory.

Constructors Properties Empty

Returns an empty Memory<T> object.

IsEmpty

Indicates whether the current instance is empty.

Length

Gets the number of items in the current instance.

Span

Returns a span from the current instance.

Methods Operators Extension Methods See also

Collaborate 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 article

Was 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