ListSortDescriptionCollection::IList::Add Method (Object^)

 

Adds an item to the collection.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

private:
virtual int Add(
	Object^ value
) sealed = IList::Add

Parameters

value
Type: System::Object^

The item to add to the collection.

Return Value

Type: System::Int32

The position into which the new element was inserted.

Exception Condition
InvalidOperationException

In all cases.

Because the ListSortDescriptionCollection class implements the System.Collections::IList interface, it must have an IList::Add method. However, because the ListSortDescriptionCollection class represents a read-only collection, adding items to the collection is an invalid operation.

.NET Framework
Available since 2.0
Return to top
Show: