Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ArrayPool<T>.Shared Property

Definition

Namespace:
System.Buffers
Assemblies:
netstandard.dll, System.Runtime.dll
Assembly:
System.Buffers.dll
Assembly:
netstandard.dll
Source:
ArrayPool.cs
Source:
ArrayPool.cs
Source:
ArrayPool.cs
Source:
ArrayPool.cs
Source:
ArrayPool.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets a shared ArrayPool<T> instance.

public:
 static property System::Buffers::ArrayPool<T> ^ Shared { System::Buffers::ArrayPool<T> ^ get(); };
public static System.Buffers.ArrayPool<T> Shared { get; }
static member Shared : System.Buffers.ArrayPool<'T>
Public Shared ReadOnly Property Shared As ArrayPool(Of T)

Property Value

A shared ArrayPool<T> instance.

Remarks

The shared pool provides a default implementation of the ArrayPool<T> class that's intended for general applicability. A shared class maintains arrays of multiple sizes, and may hand back a larger array than was actually requested, but it will never hand back a smaller array than was requested. Renting a buffer from a shared class using the Rent method will result in an existing buffer being taken from the pool if an appropriate buffer is available or in a new buffer being allocated if one is not available.

Applies to


Feedback

Was this page helpful?