Aracılığıyla paylaş


Collection.IList.Add Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Adds an item to the Collection object. Implements the IList interface.

Namespace:  Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

Syntax

'Declaration
Private Function IListAdd ( _
    value As Object _
) As Integer Implements IList.Add
int IList.Add(
    Object value
)

Parameters

Return Value

Type: System.Int32
The position into which the new element was inserted.

Implements

IList.Add(Object)

Exceptions

Exception Condition
NotSupportedException

The Collection object is read-only.

-or-

The Collection object has a fixed size.

Remarks

You can also use the Item property to add new elements by setting the value of a key that does not exist in the Collection object.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.