Class ArrayBuffer<T>
- Namespace
- NanoByte.Common.Collections
- Assembly
- NanoByte.Common.dll
An array rented from the System.Buffers.ArrayPool<T>.
public sealed class ArrayBuffer<T>
Type Parameters
T
- Inheritance
-
objectArrayBuffer<T>
- Extension Methods
Constructors
ArrayBuffer(int)
An array rented from the System.Buffers.ArrayPool<T>.
public ArrayBuffer(int length)
Parameters
length
intThe desired array length.
Properties
Array
The array. The length may be equal to or greater than the requested Length.
public T[] Array { get; }
Property Value
- T[]
Exceptions
- ObjectDisposedException
Dispose() has been called.
Length
The requested length of the array.
public int Length { get; }
Property Value
- int
Segment
A view of the array with exactly the requested Length.
public ArraySegment<T> Segment { get; }
Property Value
- ArraySegment<T>
Exceptions
- ObjectDisposedException
Dispose() has been called.
Span
A view of the array with exactly the requested Length.
public Span<T> Span { get; }
Property Value
- Span<T>
Exceptions
- ObjectDisposedException
Dispose() has been called.
Methods
Dispose()
Returns the array to the System.Buffers.ArrayPool<T>.
public void Dispose()