Table of Contents

Struct ReadOnlyList<T>

Namespace
Jitter2.DataStructures
Assembly
Jitter2.dll

A read-only wrapper around List<T> that prevents modification while allowing indexed access and enumeration.

public readonly struct ReadOnlyList<T> : IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The type of elements in the list.

Implements
Inherited Members

Constructors

ReadOnlyList(List<T>)

A read-only wrapper around List<T> that prevents modification while allowing indexed access and enumeration.

public ReadOnlyList(List<T> list)

Parameters

list List<T>

Properties

Count

Gets the number of elements in the list.

public int Count { get; }

Property Value

int

this[int]

Gets the element at the specified index.

public T this[int i] { get; }

Parameters

i int

Property Value

T

Methods

GetEnumerator()

public List<T>.Enumerator GetEnumerator()

Returns

List<T>.Enumerator