SimpleImmutableList<T>

References
public sealed class SimpleImmutableList<T>
A cheap and quick immutable list optimised for the most common use case in GrasshopperIO. Adding and indexing values is fast, removing values is slow, as is adding values to a list which in the past already had values added to it.
T

Constructors

SimpleImmutableList

#
public SimpleImmutableList()

Properties

Backwards

#
public IEnumerable<T> Backwards { get; }
Iterate over all elements from the highest to the lowest index.

Count

#
public int Count { get; }
Gets the number of items in this list.

Forwards

#
public IEnumerable<T> Forwards { get; }
Iterate over all elements from the lowest to the highest index.

Indexers

this[]

#
public T this[int index] { get; }
Gets the indexed item.
index (int)

Methods

Add

#
public SimpleImmutableList<T> Add(T item)
Add an item to this list.
item (T)

AddRange

#
public SimpleImmutableList<T> AddRange(IEnumerable<T> items)
Add a collection of items to this list.
items (IEnumerable<T>)

RemoveAt

#
public SimpleImmutableList<T> RemoveAt(int index)
Remove an indexed element from this list.
index (int)

SetItem

#
public SimpleImmutableList<T> SetItem(int index, T item)
Overwrite an element in this list.
index (int)
item (T)