IList Interface

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a non-generic collection of objects that can be individually accessed by index.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Interface IList _
	Inherits ICollection, IEnumerable

The IList type exposes the following members.

  NameDescription
Public propertyCountGets the number of elements contained in the ICollection. (Inherited from ICollection.)
Public propertyIsFixedSizeGets a value indicating whether the IList has a fixed size.
Public propertyIsReadOnlyGets a value indicating whether the IList is read-only.
Public propertyIsSynchronizedGets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.)
Public propertyItemGets or sets the element at the specified index.
Public propertySyncRootGets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.)
Top

  NameDescription
Public methodAddAdds an item to the IList.
Public methodClearRemoves all items from the IList.
Public methodContainsDetermines whether the IList contains a specific value.
Public methodCopyToCopies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection.)
Public methodGetEnumeratorReturns an enumerator that iterates through a collection. (Inherited from IEnumerable.)
Public methodIndexOfDetermines the index of a specific item in the IList.
Public methodInsertInserts an item to the IList at the specified index.
Public methodRemoveRemoves the first occurrence of a specific object from the IList.
Public methodRemoveAtRemoves the IList item at the specified index.
Top

IList is a descendant of the ICollection interface and is the base interface of all non-generic lists. IList implementations fall into three categories: read-only, fixed-size, and variable-size. A read-only IList cannot be modified. A fixed-size IList does not allow the addition or removal of elements, but it allows the modification of existing elements. A variable-size IList allows the addition, removal, and modification of elements.

Show: