IList Interface

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

[<ComVisibleAttribute(true)>]
type IList = 
    interface
        interface ICollection
        interface IEnumerable
    end

NameDescription
System_CAPS_pubpropertyCount

Gets the number of elements contained in the ICollection.(Inherited from ICollection.)

System_CAPS_pubpropertyIsFixedSize

Gets a value indicating whether the IList has a fixed size.

System_CAPS_pubpropertyIsReadOnly

Gets a value indicating whether the IList is read-only.

System_CAPS_pubpropertyIsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).(Inherited from ICollection.)

System_CAPS_pubpropertyItem(Int32)

Gets or sets the element at the specified index.

System_CAPS_pubpropertySyncRoot

Gets an object that can be used to synchronize access to the ICollection.(Inherited from ICollection.)

NameDescription
System_CAPS_pubmethodAdd(Object)

Adds an item to the IList.

System_CAPS_pubmethodClear()

Removes all items from the IList.

System_CAPS_pubmethodContains(Object)

Determines whether the IList contains a specific value.

System_CAPS_pubmethodCopyTo(Array, Int32)

Copies the elements of the ICollection to an Array, starting at a particular Array index.(Inherited from ICollection.)

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator that iterates through a collection.(Inherited from IEnumerable.)

System_CAPS_pubmethodIndexOf(Object)

Determines the index of a specific item in the IList.

System_CAPS_pubmethodInsert(Int32, Object)

Inserts an item to the IList at the specified index.

System_CAPS_pubmethodRemove(Object)

Removes the first occurrence of a specific object from the IList.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the IList item at the specified index.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<'TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<'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.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: