# RhinoList<T> class

Namespace: [Rhino.Collections](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.collections.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[Serializable]
[DebuggerTypeProxy(ListDebuggerDisplayProxy<>)]
[DebuggerDisplay("Count = {Count}")]
public class RhinoList<T> : IList<T>, IList, ICloneable
```

Represents a list of generic data. This class is similar to System.Collections.Generic.List(T) but exposes a few more methods.

**Type parameters:**

- `T`

**Derived types:** [CurveList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.curvelist.md), [Interpolator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.interpolator.md), [Point3dList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.point3dlist.md)

## Constructors

- [RhinoList<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/ctor.md): (5 overloads) Initializes a new, empty list.

## Properties

- [Capacity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/capacity.md): Gets or sets the total number of elements the internal data structure can hold without resizing.
- [Count](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/count.md): Gets the number of elements actually contained in the List.
- [First](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/first.md): Gets or sets the first item in the list. This is synonymous to calling List[0].
- [Last](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/last.md): Gets or sets the last item in the list. This is synonymous to calling List[Count-1].
- [NullCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/nullcount.md): Gets the number of null references (Nothing in Visual Basic) in this list. If T is a ValueType, this property always return zero.
- [ICollection<T>.IsReadOnly](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-generic-icollection-t-isreadonly.md): When implemented by a class, gets a value indicating whether the IList is read-only. RhinoList is never ReadOnly.
- [ICollection.IsSynchronized](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-icollection-issynchronized.md): When implemented by a class, gets a value indicating whether access to the ICollection is synchronized (thread-safe). ON_List is never Synchronized.
- [ICollection.SyncRoot](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-icollection-syncroot.md): Gets an object that can be used to synchronize access to the ICollection.
- [IList.IsFixedSize](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ilist-isfixedsize.md): When implemented by a class, gets a value indicating whether the IList has a fixed size. RhinoList is never fixed.
- [IList.IsReadOnly](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ilist-isreadonly.md): When implemented by a class, gets a value indicating whether the IList is read-only. RhinoList is never ReadOnly.

## Indexers

- [IList.this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ilist-this.md): Gets or sets the element at the specified index.
- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/item.md): Gets or sets the element at the specified index.

## Methods

- [Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/add.md): Adds an object to the end of the List.
- [AddRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/addrange.md): (2 overloads) Adds the elements of the specified collection to the end of the List.
- [AsReadOnly](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/asreadonly.md): Constructs a read-only wrapper of this class.
- [BinarySearch](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/binarysearch.md): (3 overloads) Searches the entire sorted List for an element using the specified comparer and returns the zero-based index of the element.
- [Clear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/clear.md): Removes all elements from the List.
- [Contains](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/contains.md): Determines whether an element is in the List.
- [ConvertAll<TOutput>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/convertall.md): Aggregates all results of a conversion function over this table into a new list.
- [CopyTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/copyto.md): (3 overloads) Copies a range of elements from the List to a compatible one-dimensional array, starting at the specified index of the target array.
- [Duplicate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/duplicate.md): Returns a shallow copy of this instance. If the generic type is comprised of only value types (struct, enum, ptr), then the result will be a deep copy.
- [Exists](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/exists.md): Determines whether the List contains elements that match the conditions defined by the specified predicate.
- [Find](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/find.md): Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire List.
- [FindAll](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/findall.md): Retrieves all the elements that match the conditions defined by the specified predicate.
- [FindIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/findindex.md): (3 overloads) Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List that extends from the specified index to the last element.
- [FindLast](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/findlast.md): Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire List.
- [FindLastIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/findlastindex.md): (3 overloads) Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire List.
- [ForEach](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/foreach.md): Performs the specified action on each element of the List.
- [GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/getenumerator.md): Constructs an enumerator that is capable of iterating over all items in this list.
- [GetRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/getrange.md): Constructs a shallow copy of a range of elements in the source List.
- [IndexOf](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/indexof.md): (3 overloads) Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the List that starts at the specified index and contains the specified number of elements.
- [Insert](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/insert.md): Inserts an element into the List at the specified index.
- [InsertRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/insertrange.md): Inserts the elements of a collection into the List at the specified index.
- [LastIndexOf](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/lastindexof.md): (3 overloads) Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the List that contains the specified number of elements and ends at the specified index.
- [RemapIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/remapindex.md): Remap an index in the infinite range onto the List index range.
- [Remove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/remove.md): Removes the first occurrence of a specific object from the List.
- [RemoveAll](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/removeall.md): Removes the all the elements that match the conditions defined by the specified predicate.
- [RemoveAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/removeat.md): Removes the element at the specified index of the List.
- [RemoveNulls](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/removenulls.md): Removes all elements from the List that are null references (Nothing in Visual Basic). This function will not do anything if T is not a Reference type.
- [RemoveRange](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/removerange.md): Removes a range of elements from the List.
- [Reverse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/reverse.md): (2 overloads) Reverses the order of the elements in the entire List.
- [Sort](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/sort.md): (6 overloads) Sorts the elements in the entire List using the default comparer.
- [ICollection.CopyTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-icollection-copyto.md): Copies the elements of the ICollection to an Array, starting at a particular Array index.
- [IEnumerable.GetEnumerator](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ienumerable-getenumerator.md)
- [IList.Add](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ilist-add.md): Adds an item to the IList.
- [IList.Contains](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ilist-contains.md): Determines whether an element is in the List.
- [IList.IndexOf](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ilist-indexof.md): Searches for the specified object and returns the zero-based index of the first occurrence within the entire List.
- [IList.Insert](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ilist-insert.md): Inserts an element into the List at the specified index.
- [IList.Remove](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-collections-ilist-remove.md): Removes the first occurrence of a specific object from the List.
- [ICloneable.Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/system-icloneable-clone.md)
- [ToArray](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/toarray.md): Constructs an array that contains all items in this list.
- [TrimExcess](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/trimexcess.md): Sets the capacity to the actual number of elements in the List, if that number is less than a threshold value.
- [TrueForAll](https://developer.rhino3d.com/api/rhinocommon/type/rhino.collections.rhinolist-1/trueforall.md): Determines whether every element in the List matches the conditions defined by the specified predicate.
