[]
The read-only list wrapper around the System.Collections.Generic.IList<T>.
public class ReadOnlyListWrapper<TItem, TWrapperItem> : IReadOnlyList<TWrapperItem>, IReadOnlyCollection<TWrapperItem>, IEnumerable<TWrapperItem>, IEnumerable where TItem : class where TWrapperItem : class, TItem
TItem
The item type of the underlying list.
TWrapperItem
The item type.
Gets the number of elements contained in the collection.
public int Count { get; }
Gets or sets the element at the specified index.
public TWrapperItem this[int index] { get; }
index
intThe zero-based index of the element to get or set.
The element at the specified index.
Determines whether an element is in the collection.
public bool Contains(TWrapperItem item)
item
TWrapperItemThe object to locate in the collection.
true if item is found in the collection; otherwise, false.
Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
public void CopyTo(TItem[] array, int arrayIndex)
array
TItem[]The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing.
arrayIndex
intThe zero-based index in array at which copying begins.
Searches for the specified object and returns the zero-based index of the first occurrence within the entire collection.
public int IndexOf(TWrapperItem item)
item
TWrapperItemThe object to locate in the collection.
The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, -1.