ListBox.ObjectCollection.IList.Add(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an object to the ListBox class.
This API supports the product infrastructure and is not intended to be used directly from your code.
virtual int System.Collections.IList.Add(System::Object ^ item) = System::Collections::IList::Add;
int IList.Add (object item);
int IList.Add (object? item);
abstract member System.Collections.IList.Add : obj -> int
override this.System.Collections.IList.Add : obj -> int
Function Add (item As Object) As Integer Implements IList.Add
Parameters
Returns
The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection.
Implements
Exceptions
item
is null
.
The current ListBox has a data source.
There is insufficient space available to store the new item.
Remarks
This member is an explicit interface member implementation. It can be used only when the ListBox.ObjectCollection instance is cast to an IList interface.
Applies to
.NET