BindingSource::Add Method (Object^)
.NET Framework (current version)
Adds an existing item to the internal list.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- value
-
Type:
System::Object^
An Object to be added to the internal list.
Return Value
Type: System::Int32The zero-based index at which value was added to the underlying list represented by the List property.
Implements
IList::Add(Object^)| Exception | Condition |
|---|---|
| InvalidOperationException | value differs in type from the existing items in the underlying list. |
The Add method refers the call to the underlying list's Add method.
The internal list must contain homogenous types. If the DataSource property has not already been set, then the first object added to the list defines the type for the list.
This method raises the ListChanged event.
.NET Framework
Available since 2.0
Available since 2.0
Show: