System.Windows.Forms.BindingSource.Add Method

Adds an existing item to the internal list.

Syntax

public virtual int Add (object value)

Parameters

value
An object to be added to the internal list.

Returns

The zero-based index at which value was added to the underlying list represented by the BindingSource.List property.

Remarks

The BindingSource.Add(object) method refers the call to the underlying list's Add method.

The internal list must contain homogenous types. If the BindingSource.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 BindingSource.ListChanged event.

Requirements

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