ImmutableList<TList, TElement>

Immutable list wraps another list, and allows for reading the inner list, without the ability to change it.

namespace Sirenix.Utilities
{
[DefaultMemberAttribute("Item")]
public sealed class ImmutableList<TList, TElement> : IImmutableList<TElement>, IList<TElement>, ICollection<TElement>, IEnumerable<TElement>
where TList : Object, IList<TElement>
}

Requirements

Namespace: Sirenix.Utilities
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

Constructors

Definition Description
ImmutableList(TList) Creates an immutable list around another list.

Properties

Return Type Definition Description
int Count Number of items in the list.
bool IsReadOnly Immutable list are always readonly.
TElement Item Index accessor.

Methods

Return Type Definition Description
bool Contains(TElement) Returns true if the item is contained in the list.
void CopyTo(TElement[], int) Copies the list to an array.
IEnumerator<TElement> GetEnumerator() Gets an enumerator.
int IndexOf(TElement) Gets the index of an item.