ICollection(T).Add Method

SortedSet(Of T).ICollection(Of T).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 an ICollection(Of T) object.

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

'Declaration
Private Sub Add ( _
	item As T _
) Implements ICollection(Of T).Add

Parameters

item
Type: T
The object to add to the ICollection(Of T) object.

Implements

ICollection(Of T).Add(T)

ExceptionCondition
NotSupportedException

The ICollection(Of T) is read-only.

This member is an explicit interface member implementation. It can be used only when the SortedSet(Of T) instance is cast to an ICollection(Of T) interface.

If Count is less than Capacity, this method is an O(1) operation. If the capacity must 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

Show:
© 2017 Microsoft