IList Interface

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

The IList type exposes the following members.

  NameDescription
Public propertySupported by the XNA FrameworkSupported by Portable Class LibraryCountGets the number of elements contained in the ICollection. (Inherited from ICollection.)
Public propertySupported by the XNA FrameworkSupported by Portable Class LibraryIsFixedSizeGets a value indicating whether the IList has a fixed size.
Public propertySupported by the XNA FrameworkSupported by Portable Class LibraryIsReadOnlyGets a value indicating whether the IList is read-only.
Public propertySupported by the XNA FrameworkSupported by Portable Class LibraryIsSynchronizedGets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.)
Public propertySupported by the XNA FrameworkSupported by Portable Class LibraryItemGets or sets the element at the specified index.
Public propertySupported by the XNA FrameworkSupported by Portable Class LibrarySyncRootGets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.)
Top

  NameDescription
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryAddAdds an item to the IList.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryClearRemoves all items from the IList.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryContainsDetermines whether the IList contains a specific value.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryCopyToCopies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection.)
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryGetEnumeratorReturns an enumerator that iterates through a collection. (Inherited from IEnumerable.)
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryIndexOfDetermines the index of a specific item in the IList.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryInsertInserts an item to the IList at the specified index.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryRemoveRemoves the first occurrence of a specific object from the IList.
Public methodSupported by the XNA FrameworkSupported by Portable Class LibraryRemoveAtRemoves the IList item at the specified index.
Top

  NameDescription
Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodSupported by Portable Class LibraryAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodSupported by the XNA FrameworkSupported by Portable Class LibraryCast(TResult)Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodSupported by the XNA FrameworkSupported by Portable Class LibraryOfType(TResult)Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
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.

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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft