IList.Add Method

List(Of T).IList.Add Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Adds an item to the IList.

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

'Declaration
Private Function Add ( _
	item As Object _
) As Integer Implements IList.Add

Parameters

item
Type: System.Object
The Object to add to the IList.

Return Value

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

Implements

IList.Add(Object)

ExceptionCondition
ArgumentException

item is of a type that is not assignable to the IList.

If Count is less than Capacity, this method is an O(1) operation. If the capacity needs to be increased to accommodate the new element, this method becomes an O(n) operation, where n is Count.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft