Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
660 lines (586 sloc) 36.5 KB
<Type Name="IList" FullName="System.Collections.IList">
<TypeSignature Language="C#" Value="public interface IList : System.Collections.ICollection" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IList implements class System.Collections.ICollection, class System.Collections.IEnumerable" />
<TypeSignature Language="DocId" Value="T:System.Collections.IList" />
<TypeSignature Language="VB.NET" Value="Public Interface IList&#xA;Implements ICollection" />
<TypeSignature Language="C++ CLI" Value="public interface class IList : System::Collections::ICollection" />
<TypeSignature Language="F#" Value="type IList = interface&#xA; interface ICollection&#xA; interface IEnumerable" />
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.ICollection</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a non-generic collection of objects that can be individually accessed by index.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Collections.IList> is a descendant of the <xref:System.Collections.ICollection> interface and is the base interface of all non-generic lists. <xref:System.Collections.IList> implementations fall into three categories: read-only, fixed-size, and variable-size. A read-only <xref:System.Collections.IList> cannot be modified. A fixed-size <xref:System.Collections.IList> does not allow the addition or removal of elements, but it allows the modification of existing elements. A variable-size <xref:System.Collections.IList> allows the addition, removal, and modification of elements.
For the generic version of this interface, see <xref:System.Collections.Generic.IList%601?displayProperty=nameWithType>.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list.
[!code-csharp[System.Collections.IList_Implementation#01](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#01)]
[!code-vb[System.Collections.IList_Implementation#01](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#01)]
]]></format>
</remarks>
<altmember cref="T:System.Collections.ArrayList" />
<altmember cref="T:System.Collections.ICollection" />
<altmember cref="T:System.Collections.Generic.IList`1" />
</Docs>
<Members>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public int Add (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 Add(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Collections.IList.Add(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function Add (value As Object) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int Add(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Add : obj -&gt; int" Usage="iList.Add value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The object to add to the <see cref="T:System.Collections.IList" />.</param>
<summary>Adds an item to the <see cref="T:System.Collections.IList" />.</summary>
<returns>The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.
-or-
The <see cref="T:System.Collections.IList" /> has a fixed size.</exception>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Collections.IList.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Clear();" />
<MemberSignature Language="F#" Value="abstract member Clear : unit -&gt; unit" Usage="iList.Clear " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes all items from the <see cref="T:System.Collections.IList" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Implementations of this method can vary in how they handle the <xref:System.Collections.ICollection.Count%2A?displayProperty=nameWithType> and the capacity of a collection. Typically, the count is set to zero, and references to other objects from elements of the collection are also released. The capacity can be set to zero or a default value, or it can remain unchanged.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.</exception>
</Docs>
</Member>
<Member MemberName="Contains">
<MemberSignature Language="C#" Value="public bool Contains (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Contains(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Collections.IList.Contains(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function Contains (value As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool Contains(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Contains : obj -&gt; bool" Usage="iList.Contains value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The object to locate in the <see cref="T:System.Collections.IList" />.</param>
<summary>Determines whether the <see cref="T:System.Collections.IList" /> contains a specific value.</summary>
<returns>
<see langword="true" /> if the <see cref="T:System.Object" /> is found in the <see cref="T:System.Collections.IList" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Starting with the .NET Framework 2.0, this method uses the collection's objects' <xref:System.Object.Equals%2A> and <xref:System.IComparable.CompareTo%2A> methods on `item` to determine whether item exists. In the earlier versions of the .NET Framework, this determination was made by using the <xref:System.Object.Equals%2A> and <xref:System.IComparable.CompareTo%2A> methods of the `item` parameter on the objects in the collection.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IndexOf">
<MemberSignature Language="C#" Value="public int IndexOf (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 IndexOf(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Collections.IList.IndexOf(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function IndexOf (value As Object) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int IndexOf(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member IndexOf : obj -&gt; int" Usage="iList.IndexOf value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The object to locate in the <see cref="T:System.Collections.IList" />.</param>
<summary>Determines the index of a specific item in the <see cref="T:System.Collections.IList" />.</summary>
<returns>The index of <paramref name="value" /> if found in the list; otherwise, -1.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Starting with the .NET Framework 2.0, this method uses the collection's objects' <xref:System.Object.Equals%2A> and <xref:System.IComparable.CompareTo%2A> methods on `item` to determine whether item exists. In the earlier versions of the .NET Framework, this determination was made by using the <xref:System.Object.Equals%2A> and <xref:System.IComparable.CompareTo%2A> methods of the `item` parameter on the objects in the collection.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Insert">
<MemberSignature Language="C#" Value="public void Insert (int index, object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Insert(int32 index, object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Collections.IList.Insert(System.Int32,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub Insert (index As Integer, value As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Insert(int index, System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Insert : int * obj -&gt; unit" Usage="iList.Insert (index, value)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="index">The zero-based index at which <paramref name="value" /> should be inserted.</param>
<param name="value">The object to insert into the <see cref="T:System.Collections.IList" />.</param>
<summary>Inserts an item to the <see cref="T:System.Collections.IList" /> at the specified index.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If `index` equals the number of items in the <xref:System.Collections.IList>, then `value` is appended to the end.
In collections of contiguous elements, such as lists, the elements that follow the insertion point move down to accommodate the new element. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hash table.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />.</exception>
<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.
-or-
The <see cref="T:System.Collections.IList" /> has a fixed size.</exception>
<exception cref="T:System.NullReferenceException">
<paramref name="value" /> is null reference in the <see cref="T:System.Collections.IList" />.</exception>
</Docs>
</Member>
<Member MemberName="IsFixedSize">
<MemberSignature Language="C#" Value="public bool IsFixedSize { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsFixedSize" />
<MemberSignature Language="DocId" Value="P:System.Collections.IList.IsFixedSize" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsFixedSize As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsFixedSize { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsFixedSize : bool" Usage="System.Collections.IList.IsFixedSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> has a fixed size.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Collections.IList" /> has a fixed size; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A collection with a fixed size does not allow the addition or removal of elements after the collection is created, but it allows the modification of existing elements.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsReadOnly">
<MemberSignature Language="C#" Value="public bool IsReadOnly { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsReadOnly" />
<MemberSignature Language="DocId" Value="P:System.Collections.IList.IsReadOnly" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsReadOnly As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsReadOnly { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsReadOnly : bool" Usage="System.Collections.IList.IsReadOnly" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> is read-only.</summary>
<value>
<see langword="true" /> if the <see cref="T:System.Collections.IList" /> is read-only; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A collection that is read-only does not allow the addition, removal, or modification of elements after the collection is created.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public object this[int index] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Item(int32)" />
<MemberSignature Language="DocId" Value="P:System.Collections.IList.Item(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Default Public Property Item(index As Integer) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ default[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.Item(int) : obj with get, set" Usage="System.Collections.IList.Item" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The zero-based index of the element to get or set.</param>
<summary>Gets or sets the element at the specified index.</summary>
<value>The element at the specified index.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property provides the ability to access a specific element in the collection by using the following syntax: `myCollection[index]`.
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.IList.Item%2A> property. Visual Basic implements <xref:System.Collections.IList.Item%2A> as a default property, which provides the same indexing functionality.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />.</exception>
<exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.IList" /> is read-only.</exception>
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public void Remove (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Remove(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Collections.IList.Remove(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub Remove (value As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Remove(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Remove : obj -&gt; unit" Usage="iList.Remove value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The object to remove from the <see cref="T:System.Collections.IList" />.</param>
<summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.IList" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In collections of contiguous elements, such as lists, the elements that follow the removed element move up to occupy the vacated spot. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hash table. If `value` is not found in the <xref:System.Collections.IList>, the <xref:System.Collections.IList> remains unchanged and no exception is thrown.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.
-or-
The <see cref="T:System.Collections.IList" /> has a fixed size.</exception>
<block subset="none" type="overrides">
<para>If <paramref name="value" /> is not in the list, the <see cref="M:System.Collections.IList.Remove(System.Object)" /> method should do nothing. In particular, it should not throw an exception.</para>
</block>
</Docs>
</Member>
<Member MemberName="RemoveAt">
<MemberSignature Language="C#" Value="public void RemoveAt (int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RemoveAt(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Collections.IList.RemoveAt(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub RemoveAt (index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void RemoveAt(int index);" />
<MemberSignature Language="F#" Value="abstract member RemoveAt : int -&gt; unit" Usage="iList.RemoveAt index" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The zero-based index of the item to remove.</param>
<summary>Removes the <see cref="T:System.Collections.IList" /> item at the specified index.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In collections of contiguous elements, such as lists, the elements that follow the removed element move up to occupy the vacated spot. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hash table.
## Examples
The following example demonstrates the implementation of the <xref:System.Collections.IList> interface to create a simple list, fixed-size list. This code is part of a larger example for the <xref:System.Collections.IList> interface.
[!code-csharp[System.Collections.IList_Implementation#02](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.IList_Implementation/cs/Program.cs#02)]
[!code-vb[System.Collections.IList_Implementation#02](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.IList_Implementation/vb/Program.vb#02)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />.</exception>
<exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.
-or-
The <see cref="T:System.Collections.IList" /> has a fixed size.</exception>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.