IList Interface
Represents a non-generic collection of objects that can be individually accessed by index.
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
The IList type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | Count | Gets the number of elements contained in the ICollection. (Inherited from ICollection.) |
![]() ![]() ![]() | IsFixedSize | Gets a value indicating whether the IList has a fixed size. |
![]() ![]() ![]() | IsReadOnly | Gets a value indicating whether the IList is read-only. |
![]() ![]() ![]() | IsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.) |
![]() ![]() ![]() | Item | Gets or sets the element at the specified index. |
![]() ![]() ![]() | SyncRoot | Gets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.) |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | Add | Adds an item to the IList. |
![]() ![]() ![]() | Clear | Removes all items from the IList. |
![]() ![]() ![]() | Contains | Determines whether the IList contains a specific value. |
![]() ![]() ![]() | CopyTo | Copies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection.) |
![]() ![]() ![]() | GetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.) |
![]() ![]() ![]() | IndexOf | Determines the index of a specific item in the IList. |
![]() ![]() ![]() | Insert | Inserts an item to the IList at the specified index. |
![]() ![]() ![]() | Remove | Removes the first occurrence of a specific object from the IList. |
![]() ![]() ![]() | RemoveAt | Removes the IList item at the specified index. |
| Name | Description | |
|---|---|---|
![]() ![]() | AsQueryable | Converts an IEnumerable to an IQueryable. (Defined by Queryable.) |
![]() ![]() ![]() | Cast(TResult) | Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) |
![]() ![]() ![]() | OfType(TResult) | Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) |
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.
For the generic version of this interface, see System.Collections.Generic.IList(T).
The following example demonstrates the implementation of the IList interface to create a simple list, fixed-size list.
Note: |
|---|
To run this example, see Building Examples That Use a Demo Method and a TextBlock Control. |
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

