SortedSet<T>.ICollection<T>.Add Method (T)

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Adds an item to an ICollection<T> object.

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

void ICollection<T>.Add(
	T item


Type: T

The object to add to the ICollection<T> object.

Exception Condition

The ICollection<T> is read-only.

This member is an explicit interface member implementation. It can be used only when the SortedSet<T> instance is cast to an ICollection<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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top