ListBox.ObjectCollection.IList.Add Method (Object)

 
System_CAPS_noteNote

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

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)

int IList.Add(
	object item
)

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: