ListBox::ObjectCollection::IList::Add Method (Object^)
.NET Framework (current version)
This API supports the product infrastructure and is not intended to be used directly from your code.
Adds an object to the ListBox class.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- item
-
Type:
System::Object^
The object to be added to the ListBox.
Return Value
Type: System::Int32Implements
IList::Add(Object^)| 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
Available since 1.1
Show: