ListBox::ObjectCollection::IList::Add Method (Object^)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Adds an object to the ListBox class.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

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

Parameters

item
Type: System::Object^

The object to be added to the ListBox.

Return Value

Type: System::Int32

Exception Condition
ArgumentNullException

item is null.

ArgumentException

The current ListBox has a data source.

SystemException

There is insufficient space available to store the new item.

This member is an explicit interface member implementation. It can be used only when the ListBox::ObjectCollection instance is cast to an IList interface.

.NET Framework
Available since 1.1
Return to top
Show: