Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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)
Syntax
'Declaration
Public Interface IList _
Inherits ICollection, IEnumerable
public interface IList : ICollection, IEnumerable
public interface class IList : ICollection,
IEnumerable
type IList =
interface
interface ICollection
interface IEnumerable
end
public interface IList extends ICollection, IEnumerable
The IList type exposes the following members.
Properties
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.) |
Top
Methods
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. |
Top
Remarks
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.