FixedSizeBuffers

Class FixedSizeBuffer16<T>

A fixed size buffer of length 16.

Inheritance
Implements
Declaration
public sealed class FixedSizeBuffer16<T> : ValueType, IFixedSizeBuffer<T>, IDisposable
Type Parameters
Name Description

T

The type of the elements in the buffer

Fields

Item1

A slot in the buffer

Declaration
public T Item1
Field Value
Type Description

T

Item10

A slot in the buffer

Declaration
public T Item10
Field Value
Type Description

T

Item11

A slot in the buffer

Declaration
public T Item11
Field Value
Type Description

T

Item12

A slot in the buffer

Declaration
public T Item12
Field Value
Type Description

T

Item13

A slot in the buffer

Declaration
public T Item13
Field Value
Type Description

T

Item14

A slot in the buffer

Declaration
public T Item14
Field Value
Type Description

T

Item15

A slot in the buffer

Declaration
public T Item15
Field Value
Type Description

T

Item16

A slot in the buffer

Declaration
public T Item16
Field Value
Type Description

T

Item2

A slot in the buffer

Declaration
public T Item2
Field Value
Type Description

T

Item3

A slot in the buffer

Declaration
public T Item3
Field Value
Type Description

T

Item4

A slot in the buffer

Declaration
public T Item4
Field Value
Type Description

T

Item5

A slot in the buffer

Declaration
public T Item5
Field Value
Type Description

T

Item6

A slot in the buffer

Declaration
public T Item6
Field Value
Type Description

T

Item7

A slot in the buffer

Declaration
public T Item7
Field Value
Type Description

T

Item8

A slot in the buffer

Declaration
public T Item8
Field Value
Type Description

T

Item9

A slot in the buffer

Declaration
public T Item9
Field Value
Type Description

T

Properties

Item[Int32]

Gets or sets the element at offset index.

Declaration
public T this[int index] { get; set; }
Parameters
Type Name Description

Int32

index

The index

Property Value
Type Description

T

The element at offset index.

Exceptions
Type Condition

ArgumentOutOfRangeException

The index was outside the bounds of the buffer

Methods

AsReadOnlySpan()

Returns a ReadOnlySpan<T> representing the buffer.

This method is unsafe. You must ensure the ReadOnlySpan<T> does not outlive the buffer itself.

Declaration
public ReadOnlySpan<T> AsReadOnlySpan()
Returns
Type Description

ReadOnlySpan<T>

A ReadOnlySpan<T> representing the buffer.

AsSpan()

Returns a Span<T> representing the buffer.

This method is unsafe. You must ensure the Span<T> does not outlive the buffer itself.

Declaration
public Span<T> AsSpan()
Returns
Type Description

Span<T>

A Span<T> representing the buffer.

Dispose()

Call this method when you've finished using the buffer.

Technically this method is a no-op, but calling it ensures that the buffer is not deallocated before you've finished working with it.

Declaration
public void Dispose()

Implements

IFixedSizeBuffer<T>
System.IDisposable

Extension Methods

FixedSizeBufferExtensions.ItemRef<T>(ref FixedSizeBuffer16<T>, Int32)