Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
3797 lines (3443 sloc) 252 KB
<Type Name="BindingSource" FullName="System.Windows.Forms.BindingSource">
<TypeSignature Language="C#" Value="public class BindingSource : System.ComponentModel.Component, System.Collections.IList, System.ComponentModel.IBindingListView, System.ComponentModel.ICancelAddNew, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ITypedList, System.Windows.Forms.ICurrencyManagerProvider" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit BindingSource extends System.ComponentModel.Component implements class System.Collections.ICollection, class System.Collections.IEnumerable, class System.Collections.IList, class System.ComponentModel.IBindingList, class System.ComponentModel.IBindingListView, class System.ComponentModel.ICancelAddNew, class System.ComponentModel.ISupportInitialize, class System.ComponentModel.ISupportInitializeNotification, class System.ComponentModel.ITypedList, class System.Windows.Forms.ICurrencyManagerProvider" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.BindingSource" />
<TypeSignature Language="VB.NET" Value="Public Class BindingSource&#xA;Inherits Component&#xA;Implements IBindingListView, ICancelAddNew, ICurrencyManagerProvider, IList, ISupportInitializeNotification, ITypedList" />
<TypeSignature Language="C++ CLI" Value="public ref class BindingSource : System::ComponentModel::Component, System::Collections::IList, System::ComponentModel::IBindingListView, System::ComponentModel::ICancelAddNew, System::ComponentModel::ISupportInitializeNotification, System::ComponentModel::ITypedList, System::Windows::Forms::ICurrencyManagerProvider" />
<TypeSignature Language="F#" Value="type BindingSource = class&#xA; inherit Component&#xA; interface IBindingListView&#xA; interface IBindingList&#xA; interface IList&#xA; interface ICollection&#xA; interface IEnumerable&#xA; interface ITypedList&#xA; interface ICancelAddNew&#xA; interface ISupportInitializeNotification&#xA; interface ISupportInitialize&#xA; interface ICurrencyManagerProvider" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.Component</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.ICollection</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IList</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.IBindingList</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.IBindingListView</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ICancelAddNew</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitialize</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitializeNotification</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ITypedList</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.Forms.ICurrencyManagerProvider</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.ComplexBindingProperties("DataSource", "DataMember")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultEvent("CurrentChanged")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultProperty("DataSource")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.Designer("System.Windows.Forms.Design.BindingSourceDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Designer("System.Windows.Forms.Design.BindingSourceDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Encapsulates the data source for a form.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource> component serves many purposes. First, it simplifies binding controls on a form to data by providing currency management, change notification, and other services between Windows Forms controls and data sources. This is accomplished by attaching the <xref:System.Windows.Forms.BindingSource> component to your data source using the <xref:System.Windows.Forms.BindingSource.DataSource%2A> property. For complex binding scenarios you can optionally set the <xref:System.Windows.Forms.BindingSource.DataMember%2A> property to a specific column or list in the data source. You then bind controls to the <xref:System.Windows.Forms.BindingSource>. All further interaction with the data is accomplished with calls to the <xref:System.Windows.Forms.BindingSource> component. For examples on how the <xref:System.Windows.Forms.BindingSource> can simplify the binding process, see [How to: Bind Windows Forms Controls to DBNull Database Values](~/docs/framework/winforms/controls/how-to-bind-windows-forms-controls-to-dbnull-database-values.md) and [How to: Handle Errors and Exceptions that Occur with Databinding](~/docs/framework/winforms/controls/how-to-handle-errors-and-exceptions-that-occur-with-databinding.md). Navigation and updating of the data source is accomplished through methods such as <xref:System.Windows.Forms.BindingSource.MoveNext%2A>, <xref:System.Windows.Forms.BindingSource.MoveLast%2A>, and <xref:System.Windows.Forms.BindingSource.Remove%2A>. Operations such as sorting and filtering are handled through the <xref:System.Windows.Forms.BindingSource.Sort%2A> and <xref:System.Windows.Forms.BindingSource.Filter%2A> properties. For more information on using sorting and filtering with the <xref:System.Windows.Forms.BindingSource>, see [How to: Sort and Filter ADO.NET Data with the Windows Forms BindingSource Component](~/docs/framework/winforms/controls/sort-and-filter-ado-net-data-with-wf-bindingsource-component.md).
In addition, the <xref:System.Windows.Forms.BindingSource> component can act as a strongly typed data source. Typically the type of the underlying data source is fixed through one of the following mechanisms:
- Use the <xref:System.Windows.Forms.BindingSource.Add%2A> method to add an item to the <xref:System.Windows.Forms.BindingSource> component.
- Set the <xref:System.Windows.Forms.BindingSource.DataSource%2A> property to a list, single object, or type.
Both of these mechanisms create a strongly-typed list. For more information on how to use the <xref:System.Windows.Forms.BindingSource> to bind to a type, see [How to: Bind a Windows Forms Control to a Type](~/docs/framework/winforms/controls/how-to-bind-a-windows-forms-control-to-a-type.md). You can also use the <xref:System.Windows.Forms.BindingSource> to bind your controls to a factory object. For more information on how to do this, see [How to: Bind a Windows Forms Control to a Factory Object](~/docs/framework/winforms/controls/how-to-bind-a-windows-forms-control-to-a-factory-object.md).
> [!NOTE]
> Because a <xref:System.Windows.Forms.BindingSource> handles both simple and complex data sources, terminology is problematic. Within this class documentation, the term *list* refers to a data collection within the hosted data source, and *item* denotes a single element. When discussing functionality associated with complex data sources, the equivalent terms *table* and *row* are used.
<xref:System.Windows.Forms.BindingSource> provides members for accessing the underlying data. The current item can be retrieved through the <xref:System.Windows.Forms.BindingSource.Current%2A> property, and the entire list can be retrieved through the <xref:System.Windows.Forms.BindingSource.List%2A> property. Editing operations are supported on the current item through <xref:System.Windows.Forms.BindingSource.Current%2A> and the <xref:System.Windows.Forms.BindingSource.RemoveCurrent%2A>, <xref:System.Windows.Forms.BindingSource.EndEdit%2A>, <xref:System.Windows.Forms.BindingSource.CancelEdit%2A> and <xref:System.Windows.Forms.BindingSource.Add%2A> and <xref:System.Windows.Forms.BindingSource.AddNew%2A> methods. Although currency management is handled automatically for all underlying data source types, this class exposes a number of events, such as <xref:System.Windows.Forms.BindingSource.CurrentItemChanged> and <xref:System.Windows.Forms.BindingSource.DataSourceChanged>, that allow for customization.
Data sources that are bound to a <xref:System.Windows.Forms.BindingSource> component can also be navigated and managed with the <xref:System.Windows.Forms.BindingNavigator> class, which provides a VCR-like user interface (UI) for navigating items within a list. Although <xref:System.Windows.Forms.BindingNavigator> can be bound to any data source, it was designed to integrate with a <xref:System.Windows.Forms.BindingSource> component through its <xref:System.Windows.Forms.BindingNavigator.BindingSource%2A?displayProperty=nameWithType> property.
The default property for the <xref:System.Windows.Forms.BindingSource> class is <xref:System.Windows.Forms.BindingSource.DataSource%2A>. The default event is <xref:System.Windows.Forms.BindingSource.CurrentChanged>.
> [!CAUTION]
> Many of the members of the <xref:System.Windows.Forms.BindingSource> class operate on the underlying list represented by the <xref:System.Windows.Forms.BindingSource.List%2A> property and simply refer their operation to the underlying list. Therefore, when the <xref:System.Windows.Forms.BindingSource> is bound to a custom implementation of <xref:System.Collections.IList>, the exact behavior of these members may differ from the behavior described in the class documentation. For example, the <xref:System.Windows.Forms.BindingSource.RemoveAt%2A> method calls <xref:System.Collections.IList.RemoveAt%2A?displayProperty=nameWithType>. The <xref:System.Windows.Forms.BindingSource> documentation describes the <xref:System.Windows.Forms.BindingSource.RemoveAt%2A> method with the understanding that the <xref:System.Collections.IList.RemoveAt%2A> method for the underlying <xref:System.Collections.IList> is correctly implemented.
## Examples
The following code example demonstrates a <xref:System.Windows.Forms.ListBox> bound to a <xref:System.Windows.Forms.BindingSource>. The <xref:System.Windows.Forms.BindingSource> is bound to a <xref:System.ComponentModel.BindingList%601> that contains a list of fonts.
[!code-csharp[System.Windows.Forms.BindingSourceAndBindingListOfT#0](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceAndBindingListOfT/CS/Form1.cs#0)]
[!code-vb[System.Windows.Forms.BindingSourceAndBindingListOfT#0](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceAndBindingListOfT/VB/Form1.vb#0)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.BindingSource" />
<altmember cref="T:System.Windows.Forms.BindingNavigator" />
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="T:System.Windows.Forms.CurrencyManager" />
<altmember cref="T:System.Collections.IList" />
<altmember cref="T:System.ComponentModel.IBindingList" />
<altmember cref="T:System.ComponentModel.IEditableObject" />
<related type="Article" href="~/docs/framework/winforms/controls/bindingsource-component.md">BindingSource Component</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.BindingSource" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BindingSource ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; BindingSource();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.BindingSource" /> class to the default property values.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following table shows the default <xref:System.Windows.Forms.BindingSource> property values initialized by this constructor.
|Property|Default value|
|--------------|-------------------|
|<xref:System.Windows.Forms.BindingSource.DataSource%2A>|`null`|
|<xref:System.Windows.Forms.BindingSource.DataMember%2A>|<xref:System.String.Empty>|
|<xref:System.Windows.Forms.BindingSource.Sort%2A>|`null`|
|<xref:System.Windows.Forms.BindingSource.Filter%2A>|`null`|
|<xref:System.Windows.Forms.BindingSource.RaiseListChangedEvents%2A>|`true`|
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.DataSource" />
<altmember cref="P:System.Windows.Forms.BindingSource.DataMember" />
<altmember cref="T:System.Windows.Forms.CurrencyManager" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BindingSource (System.ComponentModel.IContainer container);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.ComponentModel.IContainer container) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.#ctor(System.ComponentModel.IContainer)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (container As IContainer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; BindingSource(System::ComponentModel::IContainer ^ container);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.BindingSource : System.ComponentModel.IContainer -&gt; System.Windows.Forms.BindingSource" Usage="new System.Windows.Forms.BindingSource container" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="container" Type="System.ComponentModel.IContainer" />
</Parameters>
<Docs>
<param name="container">The <see cref="T:System.ComponentModel.IContainer" /> to add the current <see cref="T:System.Windows.Forms.BindingSource" /> to.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.BindingSource" /> class and adds the <see cref="T:System.Windows.Forms.BindingSource" /> to the specified container.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor calls the default constructor, and then adds the current <xref:System.Windows.Forms.BindingSource> to the specified container. It is not typically used by the solutions programmer, but instead by authors of design-time environments.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BindingSource (object dataSource, string dataMember);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(object dataSource, string dataMember) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.#ctor(System.Object,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (dataSource As Object, dataMember As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; BindingSource(System::Object ^ dataSource, System::String ^ dataMember);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.BindingSource : obj * string -&gt; System.Windows.Forms.BindingSource" Usage="new System.Windows.Forms.BindingSource (dataSource, dataMember)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="dataSource" Type="System.Object" />
<Parameter Name="dataMember" Type="System.String" />
</Parameters>
<Docs>
<param name="dataSource">The data source for the <see cref="T:System.Windows.Forms.BindingSource" />.</param>
<param name="dataMember">The specific column or list name within the data source to bind to.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.BindingSource" /> class with the specified data source and data member.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public virtual int Add (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 Add(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Add(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Add (value As Object) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual int Add(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Add : obj -&gt; int&#xA;override this.Add : obj -&gt; int" Usage="bindingSource.Add value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Add(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">An <see cref="T:System.Object" /> to be added to the internal list.</param>
<summary>Adds an existing item to the internal list.</summary>
<returns>The zero-based index at which <paramref name="value" /> was added to the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.Add%2A> method refers the call to the underlying list's `Add` method.
The internal list must contain homogenous types. If the <xref:System.Windows.Forms.BindingSource.DataSource%2A> property has not already been set, then the first object added to the list defines the type for the list.
This method raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event.
## Examples
The following code example how to use the <xref:System.Windows.Forms.BindingSource.Add%2A> method. To run this example, paste the code into a Windows Form, and call the `PopulateBindingSourceWithFonts` method from the form's constructor.
[!code-csharp[System.Windows.Forms.BindingSourceMethods#6](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/CS/Form1.cs#6)]
[!code-vb[System.Windows.Forms.BindingSourceMethods#6](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/VB/Form1.vb#6)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
<paramref name="value" /> differs in type from the existing items in the underlying list.</exception>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="M:System.Windows.Forms.BindingSource.Remove(System.Object)" />
<altmember cref="M:System.Windows.Forms.BindingSource.RemoveCurrent" />
<altmember cref="M:System.Windows.Forms.BindingSource.Insert(System.Int32,System.Object)" />
</Docs>
</Member>
<Member MemberName="AddingNew">
<MemberSignature Language="C#" Value="public event System.ComponentModel.AddingNewEventHandler AddingNew;" />
<MemberSignature Language="ILAsm" Value=".event class System.ComponentModel.AddingNewEventHandler AddingNew" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.AddingNew" />
<MemberSignature Language="VB.NET" Value="Public Custom Event AddingNew As AddingNewEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::ComponentModel::AddingNewEventHandler ^ AddingNew;" />
<MemberSignature Language="F#" Value="member this.AddingNew : System.ComponentModel.AddingNewEventHandler " Usage="member this.AddingNew : System.ComponentModel.AddingNewEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.AddingNewEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs before an item is added to the underlying list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.AddingNew> event occurs before a new object is added to the underlying list represented by the <xref:System.Windows.Forms.BindingSource.List%2A> property. This event is fired after the <xref:System.Windows.Forms.BindingSource.AddNew%2A> method is called, but before the new item is created and added to the underlying list. By handling this event, the programmer can provide custom item creation and insertion behavior without being forced to derive from the <xref:System.Windows.Forms.BindingSource> class. This is accomplished in the event handler by setting the <xref:System.ComponentModel.AddingNewEventArgs.NewObject%2A> property of the <xref:System.ComponentModel.AddingNewEventArgs?displayProperty=nameWithType> parameter to the new item. The new object created in the <xref:System.Windows.Forms.BindingSource.AddingNew> event must be of the same type as the type contained in the list or an exception will occur. You cannot set the <xref:System.ComponentModel.AddingNewEventArgs.NewObject%2A> property when bound to a <xref:System.Data.DataView> or <xref:System.Data.DataTable> because you cannot add a new <xref:System.Data.DataRowView> to the list.
For more information about supplying custom new item functionality, see the <xref:System.Windows.Forms.BindingSource.AddNew%2A> method. For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example uses a <xref:System.Windows.Forms.BindingSource> component to bind a list to a <xref:System.Windows.Forms.DataGridView> control. New items are added to the list by the <xref:System.Windows.Forms.BindingSource.AddingNew> event handler. This code example is part of a larger example provided in [How to: Customize Item Addition with the Windows Forms BindingSource](~/docs/framework/winforms/controls/how-to-customize-item-addition-with-the-windows-forms-bindingsource.md).
[!code-cpp[System.Windows.Forms.DataConnector.AddingNew#8](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/CPP/form1.cpp#8)]
[!code-csharp[System.Windows.Forms.DataConnector.AddingNew#8](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/CS/form1.cs#8)]
[!code-vb[System.Windows.Forms.DataConnector.AddingNew#8](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/VB/form1.vb#8)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
<see cref="P:System.ComponentModel.AddingNewEventArgs.NewObject" /> is not the same type as the type contained in the list.</exception>
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnAddingNew(System.ComponentModel.AddingNewEventArgs)" />
<altmember cref="T:System.ComponentModel.AddingNewEventArgs" />
</Docs>
</Member>
<Member MemberName="AddNew">
<MemberSignature Language="C#" Value="public virtual object AddNew ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object AddNew() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.AddNew" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AddNew () As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Object ^ AddNew();" />
<MemberSignature Language="F#" Value="abstract member AddNew : unit -&gt; obj&#xA;override this.AddNew : unit -&gt; obj" Usage="bindingSource.AddNew " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.IBindingList.AddNew</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Adds a new item to the underlying list.</summary>
<returns>The <see cref="T:System.Object" /> that was created and added to the list.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.AddNew%2A> method adds a new item to the underlying list represented by the <xref:System.Windows.Forms.BindingSource.List%2A> property. This method sets up the following series of actions:
1. The <xref:System.Windows.Forms.BindingSource.EndEdit%2A> method is automatically called to commit any pending edit operations.
2. The <xref:System.Windows.Forms.BindingSource.AddingNew> event is automatically raised. This event can be programmatically handled to construct the new item. This is accomplished in the event handler by setting the <xref:System.ComponentModel.AddingNewEventArgs.NewObject%2A> property of the <xref:System.ComponentModel.AddingNewEventArgs?displayProperty=nameWithType> parameter to the new item. The new object created in the <xref:System.Windows.Forms.BindingSource.AddingNew> event must be of the same type as the type contained in the list or an exception will occur.
If the <xref:System.Windows.Forms.BindingSource.AddingNew> event is not handled, and the underlying list is an <xref:System.ComponentModel.IBindingList>, then the request is passed to the list's <xref:System.ComponentModel.IBindingList.AddNew%2A?displayProperty=nameWithType> method. If the underlying list is not an <xref:System.ComponentModel.IBindingList>, the item is automatically created through its public default constructor. In either case, the new item is added to the end of the list.
3. The new item is added immediately to the internal list unless the data source implements the <xref:System.ComponentModel.IEditableObject> interface. In this case, the new item is not committed until an explicit call to <xref:System.Windows.Forms.BindingSource.System%23ComponentModel%23ICancelAddNew%23EndNew%2A> is made or until a new list operation is initiated. Before it is committed, the new item can be rolled back by calling <xref:System.Windows.Forms.BindingSource.CancelEdit%2A>, in which case the new item is discarded.
This method raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event.
## Examples
The following code example uses a <xref:System.Windows.Forms.BindingSource> component to bind a list to a <xref:System.Windows.Forms.DataGridView> control. New items are added to the list by the <xref:System.Windows.Forms.BindingSource.AddingNew> event handler. This code example is part of a larger example provided in [How to: Customize Item Addition with the Windows Forms BindingSource](~/docs/framework/winforms/controls/how-to-customize-item-addition-with-the-windows-forms-bindingsource.md).
[!code-cpp[System.Windows.Forms.DataConnector.AddingNew#7](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/CPP/form1.cpp#7)]
[!code-csharp[System.Windows.Forms.DataConnector.AddingNew#7](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/CS/form1.cs#7)]
[!code-vb[System.Windows.Forms.DataConnector.AddingNew#7](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/VB/form1.vb#7)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="P:System.Windows.Forms.BindingSource.AllowNew" /> property is set to <see langword="false" />.
-or-
A public default constructor could not be found for the current item type.</exception>
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="T:System.ComponentModel.AddingNewEventArgs" />
<altmember cref="E:System.Windows.Forms.BindingSource.AddingNew" />
<altmember cref="P:System.Windows.Forms.BindingSource.AllowNew" />
<altmember cref="T:System.ComponentModel.IBindingList" />
</Docs>
</Member>
<Member MemberName="AllowEdit">
<MemberSignature Language="C#" Value="public virtual bool AllowEdit { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowEdit" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.AllowEdit" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property AllowEdit As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool AllowEdit { bool get(); };" />
<MemberSignature Language="F#" Value="member this.AllowEdit : bool" Usage="System.Windows.Forms.BindingSource.AllowEdit" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ComponentModel.IBindingList.AllowEdit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether items in the underlying list can be edited.</summary>
<value>
<see langword="true" /> to indicate list items can be edited; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.AllowEdit%2A> property is typically used by other components to determine if editing of items in the list is allowed.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AllowNew">
<MemberSignature Language="C#" Value="public virtual bool AllowNew { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowNew" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.AllowNew" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property AllowNew As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool AllowNew { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.AllowNew : bool with get, set" Usage="System.Windows.Forms.BindingSource.AllowNew" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the <see cref="M:System.Windows.Forms.BindingSource.AddNew" /> method can be used to add items to the list.</summary>
<value>
<see langword="true" /> if <see cref="M:System.Windows.Forms.BindingSource.AddNew" /> can be used to add items to the list; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value for the <xref:System.Windows.Forms.BindingSource.AllowNew%2A> property depends on the underlying data source type. If the underlying list implements the <xref:System.ComponentModel.IBindingList> interface, this property will delegate to the underlying list. Otherwise, this property will return `false` if the underlying list has any of the following characteristics:
- It has a fixed size, as determined by the <xref:System.Collections.IList.IsFixedSize%2A?displayProperty=nameWithType> property.
- It is read-only, as determined by the <xref:System.Collections.IList.IsReadOnly%2A?displayProperty=nameWithType> property.
- The item's type does not have a default constructor.
> [!NOTE]
> Once the value of this property is set, the getter no longer refers the call to the underlying list. Instead, it simply returns the value that was previously set until the <xref:System.Windows.Forms.BindingSource.ResetAllowNew%2A> method is called.
Setting this property raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event with <xref:System.ComponentModel.ListChangedEventArgs.ListChangedType?displayProperty=nameWithType> set to <xref:System.ComponentModel.ListChangedType.Reset?displayProperty=nameWithType>.
If you set the <xref:System.Windows.Forms.BindingSource.AllowNew%2A> property to `true` and the underlying list type does not have a default constructor, you must handle the <xref:System.Windows.Forms.BindingSource.AddingNew> event and create the appropriate type.
## Examples
The following code example demonstrates using the <xref:System.Windows.Forms.BindingSource.AllowNew%2A> property of the <xref:System.Windows.Forms.BindingSource> component to permit the user to add new items to the <xref:System.Windows.Forms.BindingSource> component's underlying list. Setting this property to `true` causes the bound <xref:System.Windows.Forms.DataGridView> control to display its row for new records.
[!code-cpp[System.Windows.Forms.DataConnector.ItemChangedEventMode#6](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/CPP/form1.cpp#6)]
[!code-csharp[System.Windows.Forms.DataConnector.ItemChangedEventMode#6](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/CS/form1.cs#6)]
[!code-vb[System.Windows.Forms.DataConnector.ItemChangedEventMode#6](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/VB/form1.vb#6)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">This property is set to <see langword="true" /> when the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property has a fixed size or is read-only.</exception>
<exception cref="T:System.MissingMethodException">The property is set to <see langword="true" /> and the <see cref="E:System.Windows.Forms.BindingSource.AddingNew" /> event is not handled when the underlying list type does not have a default constructor.</exception>
<altmember cref="P:System.ComponentModel.AddingNewEventArgs.NewObject" />
<altmember cref="M:System.Windows.Forms.BindingSource.ResetAllowNew" />
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.AllowEdit" />
<altmember cref="P:System.Windows.Forms.BindingSource.AllowRemove" />
<altmember cref="M:System.Windows.Forms.BindingSource.EndEdit" />
<altmember cref="M:System.Windows.Forms.BindingSource.CancelEdit" />
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
</Docs>
</Member>
<Member MemberName="AllowRemove">
<MemberSignature Language="C#" Value="public virtual bool AllowRemove { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowRemove" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.AllowRemove" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property AllowRemove As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool AllowRemove { bool get(); };" />
<MemberSignature Language="F#" Value="member this.AllowRemove : bool" Usage="System.Windows.Forms.BindingSource.AllowRemove" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ComponentModel.IBindingList.AllowRemove</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether items can be removed from the underlying list.</summary>
<value>
<see langword="true" /> to indicate list items can be removed from the list; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.AllowRemove%2A> property is typically used by other components to determine if editing of items in the list is allowed.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="ApplySort">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Sorts the data source with the specified sort description or descriptions.</summary>
</Docs>
</MemberGroup>
<Member MemberName="ApplySort">
<MemberSignature Language="C#" Value="public virtual void ApplySort (System.ComponentModel.ListSortDescriptionCollection sorts);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ApplySort(class System.ComponentModel.ListSortDescriptionCollection sorts) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.ApplySort(System.ComponentModel.ListSortDescriptionCollection)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ApplySort (sorts As ListSortDescriptionCollection)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void ApplySort(System::ComponentModel::ListSortDescriptionCollection ^ sorts);" />
<MemberSignature Language="F#" Value="abstract member ApplySort : System.ComponentModel.ListSortDescriptionCollection -&gt; unit&#xA;override this.ApplySort : System.ComponentModel.ListSortDescriptionCollection -&gt; unit" Usage="bindingSource.ApplySort sorts" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.IBindingListView.ApplySort(System.ComponentModel.ListSortDescriptionCollection)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sorts" Type="System.ComponentModel.ListSortDescriptionCollection" />
</Parameters>
<Docs>
<param name="sorts">A <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> containing the sort descriptions to apply to the data source.</param>
<summary>Sorts the data source with the specified sort descriptions.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.ComponentModel.IBindingListView> implements multi-column sorting as a set of property descriptor-direction pairs.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The data source is not an <see cref="T:System.ComponentModel.IBindingListView" />.</exception>
</Docs>
</Member>
<Member MemberName="ApplySort">
<MemberSignature Language="C#" Value="public virtual void ApplySort (System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection sort);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ApplySort(class System.ComponentModel.PropertyDescriptor property, valuetype System.ComponentModel.ListSortDirection sort) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.ApplySort(System.ComponentModel.PropertyDescriptor,System.ComponentModel.ListSortDirection)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ApplySort (property As PropertyDescriptor, sort As ListSortDirection)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void ApplySort(System::ComponentModel::PropertyDescriptor ^ property, System::ComponentModel::ListSortDirection sort);" />
<MemberSignature Language="F#" Value="abstract member ApplySort : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -&gt; unit&#xA;override this.ApplySort : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -&gt; unit" Usage="bindingSource.ApplySort (property, sort)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor,System.ComponentModel.ListSortDirection)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="property" Type="System.ComponentModel.PropertyDescriptor" />
<Parameter Name="sort" Type="System.ComponentModel.ListSortDirection" />
</Parameters>
<Docs>
<param name="property">A <see cref="T:System.ComponentModel.PropertyDescriptor" /> that describes the property by which to sort the data source.</param>
<param name="sort">A <see cref="T:System.ComponentModel.ListSortDirection" /> indicating how the list should be sorted.</param>
<summary>Sorts the data source using the specified property descriptor and sort direction.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ComponentModel.IBindingList> implements single column sorting using a <xref:System.ComponentModel.PropertyDescriptor> to indicate a property to sort by and a <xref:System.ComponentModel.ListSortDirection> indicating whether the property contents should be sorted in ascending or descending order.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The data source is not an <see cref="T:System.ComponentModel.IBindingList" />.</exception>
</Docs>
</Member>
<Member MemberName="BindingComplete">
<MemberSignature Language="C#" Value="public event System.Windows.Forms.BindingCompleteEventHandler BindingComplete;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Forms.BindingCompleteEventHandler BindingComplete" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.BindingComplete" />
<MemberSignature Language="VB.NET" Value="Public Custom Event BindingComplete As BindingCompleteEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::Forms::BindingCompleteEventHandler ^ BindingComplete;" />
<MemberSignature Language="F#" Value="member this.BindingComplete : System.Windows.Forms.BindingCompleteEventHandler " Usage="member this.BindingComplete : System.Windows.Forms.BindingCompleteEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.BindingCompleteEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when all the clients have been bound to this <see cref="T:System.Windows.Forms.BindingSource" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.BindingComplete> event occurs after all the clients, typically controls, have been bound to the current <xref:System.Windows.Forms.BindingSource>. The handler of this event can take the appropriate action based on the success, error, or exceptions in the binding process, by examining the <xref:System.Windows.Forms.BindingCompleteEventArgs.BindingCompleteState%2A> property of the <xref:System.Windows.Forms.BindingCompleteEventArgs> parameter.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates handling the <xref:System.Windows.Forms.BindingSource.BindingComplete> event. To run this code, paste it into an empty code file.
[!code-cpp[System.Windows.Forms.DataConnectorBindingComplete#3](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorBindingComplete/CPP/form1.cpp#3)]
[!code-csharp[System.Windows.Forms.DataConnectorBindingComplete#3](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorBindingComplete/CS/form1.cs#3)]
[!code-vb[System.Windows.Forms.DataConnectorBindingComplete#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorBindingComplete/VB/form1.vb#3)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingCompleteEventArgs.BindingCompleteState" />
<altmember cref="T:System.Windows.Forms.BindingCompleteEventArgs" />
</Docs>
</Member>
<Member MemberName="CancelEdit">
<MemberSignature Language="C#" Value="public void CancelEdit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void CancelEdit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.CancelEdit" />
<MemberSignature Language="VB.NET" Value="Public Sub CancelEdit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void CancelEdit();" />
<MemberSignature Language="F#" Value="member this.CancelEdit : unit -&gt; unit" Usage="bindingSource.CancelEdit " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Cancels the current edit operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method discards modifications to data since the last save or load operation if both of the following conditions are met:
- The data source implements the <xref:System.ComponentModel.IEditableObject> interface.
- The <xref:System.Windows.Forms.BindingSource.EndEdit%2A> method has not been called yet.
This method calls the <xref:System.Windows.Forms.CurrencyManager.CancelCurrentEdit%2A> method of the underlying <xref:System.Windows.Forms.CurrencyManager>, and is scoped to row-level changes.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="M:System.Windows.Forms.BindingSource.EndEdit" />
<altmember cref="T:System.ComponentModel.IEditableObject" />
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public virtual void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Clear" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Clear();" />
<MemberSignature Language="F#" Value="abstract member Clear : unit -&gt; unit&#xA;override this.Clear : unit -&gt; unit" Usage="bindingSource.Clear " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Clear</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes all elements from the list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.Clear%2A> method removes all elements from the underlying list represented by the <xref:System.Windows.Forms.BindingSource.List%2A> property and sets the <xref:System.Windows.Forms.BindingSource.Count%2A> property to zero.
This method raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="M:System.Windows.Forms.BindingSource.RemoveCurrent" />
<altmember cref="M:System.Windows.Forms.BindingSource.CancelEdit" />
</Docs>
</Member>
<Member MemberName="Contains">
<MemberSignature Language="C#" Value="public virtual bool Contains (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Contains(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Contains(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Contains (value As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool Contains(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Contains : obj -&gt; bool&#xA;override this.Contains : obj -&gt; bool" Usage="bindingSource.Contains value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Contains(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.Object" /> to locate in the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property. The value can be <see langword="null" />.</param>
<summary>Determines whether an object is an item in the list.</summary>
<returns>
<see langword="true" /> if the <paramref name="value" /> parameter is found in the <see cref="P:System.Windows.Forms.BindingSource.List" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Although the implementation is dependent on the underlying list's `Contains` method, typically the following characteristics apply:
- <xref:System.Windows.Forms.BindingSource.List%2A> is searched starting at the first element and ending at the last element.
- The underlying method performs a linear search; therefore, the average execution time is proportional to the value of the <xref:System.Windows.Forms.BindingSource.Count%2A> property.
- The underlying method determines equality by calling the <xref:System.Object.Equals%2A> method.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Forms.BindingSource.IndexOf(System.Object)" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Item(System.Int32)" />
<altmember cref="M:System.Windows.Forms.BindingSource.Find(System.ComponentModel.PropertyDescriptor,System.Object)" />
</Docs>
</Member>
<Member MemberName="CopyTo">
<MemberSignature Language="C#" Value="public virtual void CopyTo (Array arr, int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CopyTo(class System.Array arr, int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.CopyTo(System.Array,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub CopyTo (arr As Array, index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void CopyTo(Array ^ arr, int index);" />
<MemberSignature Language="F#" Value="abstract member CopyTo : Array * int -&gt; unit&#xA;override this.CopyTo : Array * int -&gt; unit" Usage="bindingSource.CopyTo (arr, index)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="arr" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="arr">The destination array.</param>
<param name="index">The index in the destination array at which to start the copy operation.</param>
<summary>Copies the contents of the <see cref="P:System.Windows.Forms.BindingSource.List" /> to the specified array, starting at the specified index value.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this method to combine items from multiple sources into a single array.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Count">
<MemberSignature Language="C#" Value="public virtual int Count { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.Count" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Count As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property int Count { int get(); };" />
<MemberSignature Language="F#" Value="member this.Count : int" Usage="System.Windows.Forms.BindingSource.Count" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.Count</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the total number of items in the underlying list, taking the current <see cref="P:System.Windows.Forms.BindingSource.Filter" /> value into consideration.</summary>
<value>The total number of filtered items in the underlying list.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.Count%2A> property gets the number of items in the underlying list represented by the <xref:System.Windows.Forms.BindingSource.List%2A> property as modified by the value of the <xref:System.Windows.Forms.BindingSource.Filter%2A> property.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.BindingSource.List%2A>, <xref:System.Windows.Forms.BindingSource.RemoveAt%2A>, and <xref:System.Windows.Forms.BindingSource.Count%2A> members. To run this example, paste the code into a form that contains a <xref:System.Windows.Forms.BindingSource> named `BindingSource1`, two labels named `label1` and `label2`, and a button named `button1`. Associate the `button1_Click` method with the <xref:System.Windows.Forms.Control.Click> event for `button1`. Visual Basic users will need to add a reference to System.Data.dll.
[!code-csharp[System.Windows.Forms.DataConnectorFilterAndSort#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorFilterAndSort/CS/form1.cs#2)]
[!code-vb[System.Windows.Forms.DataConnectorFilterAndSort#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorFilterAndSort/VB/form1.vb#2)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
</Docs>
</Member>
<Member MemberName="CurrencyManager">
<MemberSignature Language="C#" Value="public virtual System.Windows.Forms.CurrencyManager CurrencyManager { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Forms.CurrencyManager CurrencyManager" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.CurrencyManager" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property CurrencyManager As CurrencyManager" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Windows::Forms::CurrencyManager ^ CurrencyManager { System::Windows::Forms::CurrencyManager ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CurrencyManager : System.Windows.Forms.CurrencyManager" Usage="System.Windows.Forms.BindingSource.CurrencyManager" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Windows.Forms.ICurrencyManagerProvider.CurrencyManager</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.CurrencyManager</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the currency manager associated with this <see cref="T:System.Windows.Forms.BindingSource" />.</summary>
<value>The <see cref="T:System.Windows.Forms.CurrencyManager" /> associated with this <see cref="T:System.Windows.Forms.BindingSource" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you want to access the currency manager for another binding to the same data member use the <xref:System.Windows.Forms.BindingSource.GetRelatedCurrencyManager%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Current">
<MemberSignature Language="C#" Value="public object Current { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Current" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.Current" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Current As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ Current { System::Object ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Current : obj" Usage="System.Windows.Forms.BindingSource.Current" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the current item in the list.</summary>
<value>An <see cref="T:System.Object" /> that represents the current item in the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property, or <see langword="null" /> if the list has no items.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.BindingSource.Current%2A> property to access the current item, but use the <xref:System.Windows.Forms.BindingSource.List%2A> property to get the entire list. To determine the type of the current object, use the <xref:System.Object.GetType%2A>, or <xref:System.Object.ToString%2A> methods.
To change the current item, set the <xref:System.Windows.Forms.BindingSource.Position%2A> property to a new integral value, or use one of the navigation methods such as <xref:System.Windows.Forms.BindingSource.MoveNext%2A>.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.BindingSource.Current%2A> property. To run this example, paste the code into a form and call the `PopulateBindingSourceWithFonts` method from the form's <xref:System.Windows.Forms.Form.Load> event handling method.
[!code-csharp[System.Windows.Forms.BindingSourceMethods#6](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/CS/Form1.cs#6)]
[!code-vb[System.Windows.Forms.BindingSourceMethods#6](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/VB/Form1.vb#6)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
</Docs>
</Member>
<Member MemberName="CurrentChanged">
<MemberSignature Language="C#" Value="public event EventHandler CurrentChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler CurrentChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.CurrentChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event CurrentChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ CurrentChanged;" />
<MemberSignature Language="F#" Value="member this.CurrentChanged : EventHandler " Usage="member this.CurrentChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the currently bound item changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.CurrentChanged> event is raised whenever the <xref:System.Windows.Forms.BindingSource.Current%2A> property changes for any of the following reasons:
- The current position of the <xref:System.Windows.Forms.BindingSource.List%2A> changes.
- The <xref:System.Windows.Forms.BindingSource.DataSource%2A> or <xref:System.Windows.Forms.BindingSource.DataMember%2A> properties change.
- The membership of the underlying <xref:System.Windows.Forms.BindingSource.List%2A> changes, which causes <xref:System.Windows.Forms.BindingSource.Position%2A> to refer to a different item. Examples include adding or deleting an item before the current item, deleting or moving the current item itself, or moving an item to the current position.
- The underlying list is refreshed by a new sorting or filtering operation.
When this event is triggered, the <xref:System.Windows.Forms.BindingSource.Current%2A> property will already contain its new value.
<xref:System.Windows.Forms.BindingSource.CurrentChanged> is the default event for the <xref:System.Windows.Forms.BindingSource> class.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<altmember cref="E:System.Windows.Forms.BindingManagerBase.CurrentChanged" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnCurrentChanged(System.EventArgs)" />
<altmember cref="E:System.Windows.Forms.BindingSource.ListChanged" />
<altmember cref="E:System.Windows.Forms.BindingSource.CurrentItemChanged" />
<altmember cref="E:System.Windows.Forms.BindingSource.PositionChanged" />
</Docs>
</Member>
<Member MemberName="CurrentItemChanged">
<MemberSignature Language="C#" Value="public event EventHandler CurrentItemChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler CurrentItemChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.CurrentItemChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event CurrentItemChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ CurrentItemChanged;" />
<MemberSignature Language="F#" Value="member this.CurrentItemChanged : EventHandler " Usage="member this.CurrentItemChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when a property value of the <see cref="P:System.Windows.Forms.BindingSource.Current" /> property has changed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.CurrentItemChanged> event is raised in response to all of the circumstances that raise the <xref:System.Windows.Forms.BindingSource.CurrentChanged> event. Additionally, <xref:System.Windows.Forms.BindingSource.CurrentItemChanged> is also fired whenever the value of one of the properties of <xref:System.Windows.Forms.BindingSource.Current%2A> is changed.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnCurrentChanged(System.EventArgs)" />
<altmember cref="E:System.Windows.Forms.BindingSource.ListChanged" />
<altmember cref="E:System.Windows.Forms.BindingSource.CurrentChanged" />
<altmember cref="E:System.Windows.Forms.BindingSource.PositionChanged" />
</Docs>
</Member>
<Member MemberName="DataError">
<MemberSignature Language="C#" Value="public event System.Windows.Forms.BindingManagerDataErrorEventHandler DataError;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Forms.BindingManagerDataErrorEventHandler DataError" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.DataError" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DataError As BindingManagerDataErrorEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::Forms::BindingManagerDataErrorEventHandler ^ DataError;" />
<MemberSignature Language="F#" Value="member this.DataError : System.Windows.Forms.BindingManagerDataErrorEventHandler " Usage="member this.DataError : System.Windows.Forms.BindingManagerDataErrorEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.BindingManagerDataErrorEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when a currency-related exception is silently handled by the <see cref="T:System.Windows.Forms.BindingSource" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This event is informational and reports CLS-compliant exceptions only. To determine what type of exception occurred, handle this event and check the <xref:System.Windows.Forms.BindingManagerDataErrorEventArgs.Exception%2A> property of the <xref:System.Windows.Forms.BindingManagerDataErrorEventArgs>.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DataMember">
<MemberSignature Language="C#" Value="public string DataMember { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DataMember" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.DataMember" />
<MemberSignature Language="VB.NET" Value="Public Property DataMember As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ DataMember { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.DataMember : string with get, set" Usage="System.Windows.Forms.BindingSource.DataMember" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.Editor("System.Windows.Forms.Design.DataMemberListEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Windows.Forms.Design.DataMemberListEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the specific list in the data source to which the connector currently binds to.</summary>
<value>The name of a list (or row) in the <see cref="P:System.Windows.Forms.BindingSource.DataSource" />. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Windows.Forms.BindingSource.DataSource%2A> contains multiple lists (or tables) of data, you should set the <xref:System.Windows.Forms.BindingSource.DataMember%2A> property to the name of one of the sources.
Setting this property raises the <xref:System.Windows.Forms.BindingSource.DataMemberChanged> event
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.DataSource" />
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="E:System.Windows.Forms.BindingSource.DataMemberChanged" />
</Docs>
</Member>
<Member MemberName="DataMemberChanged">
<MemberSignature Language="C#" Value="public event EventHandler DataMemberChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler DataMemberChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.DataMemberChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DataMemberChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ DataMemberChanged;" />
<MemberSignature Language="F#" Value="member this.DataMemberChanged : EventHandler " Usage="member this.DataMemberChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="P:System.Windows.Forms.BindingSource.DataMember" /> property value has changed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.DataMemberChanged> event occurs after the <xref:System.Windows.Forms.BindingSource.DataMember%2A> property changes.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.DataMember" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnDataMemberChanged(System.EventArgs)" />
<altmember cref="E:System.Windows.Forms.BindingSource.DataSourceChanged" />
</Docs>
</Member>
<Member MemberName="DataSource">
<MemberSignature Language="C#" Value="public object DataSource { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object DataSource" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.DataSource" />
<MemberSignature Language="VB.NET" Value="Public Property DataSource As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ DataSource { System::Object ^ get(); void set(System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.DataSource : obj with get, set" Usage="System.Windows.Forms.BindingSource.DataSource" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.AttributeProvider(typeof(System.ComponentModel.IListSource))</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the data source that the connector binds to.</summary>
<value>An <see cref="T:System.Object" /> that acts as a data source. The default is <see langword="null" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.DataSource%2A> property can be set to a number of data sources, including types, objects, and lists of types. The resulting data source will be exposed as a list. The following table shows some of the common data sources and the resulting list evaluation.
|DataSource property|List results|
|-------------------------|------------------|
|`null`|An empty <xref:System.ComponentModel.IBindingList> of objects. Adding an item sets the list to the type of the added item.|
|`null` with <xref:System.Windows.Forms.BindingSource.DataMember%2A> set|Not supported, raises <xref:System.ArgumentException>.|
|Non-list type or object of type "T"|Empty <xref:System.ComponentModel.IBindingList> of type "T".|
|Array instance|<xref:System.ComponentModel.IBindingList> containing the array elements.|
|<xref:System.Collections.IEnumerable> instance|An <xref:System.ComponentModel.IBindingList> containing the <xref:System.Collections.IEnumerable> items.|
|List instance containing type "T"|<xref:System.ComponentModel.IBindingList> instance containing type "T".|
In addition, <xref:System.Windows.Forms.BindingSource.DataSource%2A> can be set to other list types such as <xref:System.ComponentModel.IListSource> and <xref:System.ComponentModel.ITypedList> and the <xref:System.Windows.Forms.BindingSource> will handle them appropriately. In this case, the type contained in the list should have a default constructor.
When setting a data source, if the supplied reference contains more than one list or table, you must set the <xref:System.Windows.Forms.BindingSource.DataMember%2A> property to a string that specifies the list to bind to. Setting this property raises the <xref:System.Windows.Forms.BindingSource.DataSourceChanged> event.
> [!NOTE]
> If you make any changes to the <xref:System.Windows.Forms.BindingSource.DataSource%2A> property value, you should do so on the user interface (UI) thread to ensure that the UI reflects the changes.
The <xref:System.Windows.Forms.BindingSource.DataSource%2A> property is the default property for the <xref:System.Windows.Forms.BindingSource> class.
## Examples
The following code example assigns a list of customers to the <xref:System.Windows.Forms.BindingSource.DataSource%2A> of a <xref:System.Windows.Forms.BindingSource> component. This code example is part of a larger example provided at [How to: Raise Change Notifications Using the BindingSource ResetItem Method](~/docs/framework/winforms/controls/how-to-raise-change-notifications-using-the-bindingsource-resetitem-method.md).
[!code-cpp[System.Windows.Forms.DataConnector.ResetItem#6](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ResetItem/CPP/form1.cpp#6)]
[!code-csharp[System.Windows.Forms.DataConnector.ResetItem#6](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ResetItem/CS/form1.cs#6)]
[!code-vb[System.Windows.Forms.DataConnector.ResetItem#6](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ResetItem/VB/form1.vb#6)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.DataMember" />
<altmember cref="T:System.Collections.IList" />
<altmember cref="T:System.ComponentModel.IListSource" />
</Docs>
</Member>
<Member MemberName="DataSourceChanged">
<MemberSignature Language="C#" Value="public event EventHandler DataSourceChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler DataSourceChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.DataSourceChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DataSourceChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ DataSourceChanged;" />
<MemberSignature Language="F#" Value="member this.DataSourceChanged : EventHandler " Usage="member this.DataSourceChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="P:System.Windows.Forms.BindingSource.DataSource" /> property value has changed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.DataSourceChanged> event occurs after the <xref:System.Windows.Forms.BindingSource.DataSource%2A> property changes.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.DataSource" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnDataSourceChanged(System.EventArgs)" />
<altmember cref="E:System.Windows.Forms.BindingSource.DataMemberChanged" />
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void Dispose(bool disposing);" />
<MemberSignature Language="F#" Value="override this.Dispose : bool -&gt; unit" Usage="bindingSource.Dispose disposing" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="disposing">
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
<summary>Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.BindingSource" /> and optionally releases the managed resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is called by the public `Dispose` method and the <xref:System.Object.Finalize%2A> method. `Dispose` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. <xref:System.Object.Finalize%2A> invokes `Dispose` with `disposing` set to `false`.
When the `disposing` parameter is true, this method releases all resources held by any managed objects that this <xref:System.Windows.Forms.BindingSource> references. This method invokes the `Dispose` method of each referenced object.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>
<see langword="Dispose" /> can be called multiple times by other objects. When overriding <see langword="Dispose(Boolean)" /> be careful not to reference objects that have been previously disposed of in an earlier call to <see langword="Dispose" />. For more information about how to implement <see langword="Dispose(Boolean)" />, see [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).
For more information about <see langword="Dispose" /> and <see cref="M:System.Object.Finalize" />, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md) and [Overriding the Finalize Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)).</para>
</block>
</Docs>
</Member>
<Member MemberName="EndEdit">
<MemberSignature Language="C#" Value="public void EndEdit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void EndEdit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.EndEdit" />
<MemberSignature Language="VB.NET" Value="Public Sub EndEdit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void EndEdit();" />
<MemberSignature Language="F#" Value="member this.EndEdit : unit -&gt; unit" Usage="bindingSource.EndEdit " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Applies pending changes to the underlying data source.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the <xref:System.Windows.Forms.BindingSource.EndEdit%2A> method is called, all pending changes are applied to the underlying data source.
This method has no effect unless the objects contained by the data source implement the <xref:System.ComponentModel.IEditableObject> interface. If the objects do not implement the <xref:System.ComponentModel.IEditableObject> interface, changes to the data are copied to the underlying data source immediately after each change.
This method raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="T:System.ComponentModel.IEditableObject" />
<altmember cref="M:System.Windows.Forms.BindingSource.CancelEdit" />
<altmember cref="M:System.Windows.Forms.BindingSource.System#ComponentModel#ICancelAddNew#EndNew(System.Int32)" />
</Docs>
</Member>
<Member MemberName="Filter">
<MemberSignature Language="C#" Value="public virtual string Filter { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Filter" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.Filter" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Filter As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ Filter { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Filter : string with get, set" Usage="System.Windows.Forms.BindingSource.Filter" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ComponentModel.IBindingListView.Filter</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the expression used to filter which rows are viewed.</summary>
<value>A string that specifies how rows are to be filtered. The default is <see langword="null" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Typically used in complex data-binding scenarios, the <xref:System.Windows.Forms.BindingSource.Filter%2A> property allows you to view a subset of the <xref:System.Windows.Forms.BindingSource.DataSource%2A>. Only underlying lists that implement the <xref:System.ComponentModel.IBindingListView> interface support filtering.
When <xref:System.Windows.Forms.BindingSource.Filter%2A> is not `null`, the <xref:System.Windows.Forms.BindingSource> passes this property to the underlying list. If you set this property during object initialization, the call will be deferred until after initialization is complete.
To form a filter value, specify the name of a column followed by an operator and a value to filter on. The accepted filter syntax depends on the underlying data source. If the underlying data source is a <xref:System.Data.DataSet>, <xref:System.Data.DataTable>, or <xref:System.Data.DataView>, you can specify Boolean expressions using the syntax documented for the <xref:System.Data.DataColumn.Expression%2A?displayProperty=nameWithType> property.
The value of the <xref:System.Windows.Forms.BindingSource.Filter%2A> property affects the value of the <xref:System.Windows.Forms.BindingSource.Count%2A> property. Additionally, the <xref:System.Windows.Forms.BindingSource.Filter%2A> value will persist when the data source changes. To stop filtering the <xref:System.Windows.Forms.BindingSource.DataSource%2A>, call the <xref:System.Windows.Forms.BindingSource.RemoveFilter%2A> method.
## Examples
The following example shows how to use the <xref:System.Windows.Forms.BindingSource.Filter%2A> property with a <xref:System.Data.DataView>. To run this example, paste the code into a Windows Form and call `PopulateDataViewAndFilter` from the form's constructor or <xref:System.Windows.Forms.Form.Load> event-handling method. Your form should import the <xref:System.Xml> and <xref:System.IO> namespaces.
[!code-csharp[System.Windows.Forms.BindingSourceMethods#3](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/CS/Form1.cs#3)]
[!code-vb[System.Windows.Forms.BindingSourceMethods#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/VB/Form1.vb#3)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.DataSource" />
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Sort" />
<altmember cref="M:System.Windows.Forms.BindingSource.RemoveFilter" />
<altmember cref="P:System.ComponentModel.IBindingList.IsSorted" />
</Docs>
</Member>
<MemberGroup MemberName="Find">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Find the specified item in the data source.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Find">
<MemberSignature Language="C#" Value="public virtual int Find (System.ComponentModel.PropertyDescriptor prop, object key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 Find(class System.ComponentModel.PropertyDescriptor prop, object key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Find(System.ComponentModel.PropertyDescriptor,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Find (prop As PropertyDescriptor, key As Object) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual int Find(System::ComponentModel::PropertyDescriptor ^ prop, System::Object ^ key);" />
<MemberSignature Language="F#" Value="abstract member Find : System.ComponentModel.PropertyDescriptor * obj -&gt; int&#xA;override this.Find : System.ComponentModel.PropertyDescriptor * obj -&gt; int" Usage="bindingSource.Find (prop, key)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="prop" Type="System.ComponentModel.PropertyDescriptor" />
<Parameter Name="key" Type="System.Object" />
</Parameters>
<Docs>
<param name="prop">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to search for.</param>
<param name="key">The value of <paramref name="prop" /> to match.</param>
<summary>Searches for the index of the item that has the given property descriptor.</summary>
<returns>The zero-based index of the item that has the given value for <see cref="T:System.ComponentModel.PropertyDescriptor" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is typically used in complex data-binding cases to locate the first row where the value of the field specified by the `prop` parameter equals the value of the `key` parameter
This method simply refers the request to the underlying list's <xref:System.ComponentModel.IBindingList.Find%2A?displayProperty=nameWithType> method. For example, if the underlying data source is a <xref:System.Data.DataSet>, <xref:System.Data.DataTable>, or <xref:System.Data.DataView>, this method calls the <xref:System.Data.DataView.System%23ComponentModel%23IBindingList%23Find%2A?displayProperty=nameWithType> method. The behavior of <xref:System.ComponentModel.IBindingList.Find%2A?displayProperty=nameWithType>, such as the value returned if no matching item is found, depends on the implementation of the method in the underlying list.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.BindingSource.Find%2A> method. For the complete example see the class overview topic.
[!code-csharp[System.Windows.Forms.BindingSourceAndBindingListOfT#4](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceAndBindingListOfT/CS/Form1.cs#4)]
[!code-vb[System.Windows.Forms.BindingSourceAndBindingListOfT#4](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceAndBindingListOfT/VB/Form1.vb#4)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The underlying list is not of type <see cref="T:System.ComponentModel.IBindingList" />.</exception>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="M:System.Windows.Forms.BindingSource.IndexOf(System.Object)" />
<altmember cref="M:System.Windows.Forms.BindingSource.Contains(System.Object)" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Item(System.Int32)" />
</Docs>
</Member>
<Member MemberName="Find">
<MemberSignature Language="C#" Value="public int Find (string propertyName, object key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 Find(string propertyName, object key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Find(System.String,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function Find (propertyName As String, key As Object) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int Find(System::String ^ propertyName, System::Object ^ key);" />
<MemberSignature Language="F#" Value="member this.Find : string * obj -&gt; int" Usage="bindingSource.Find (propertyName, key)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="propertyName" Type="System.String" />
<Parameter Name="key" Type="System.Object" />
</Parameters>
<Docs>
<param name="propertyName">The name of the property to search for.</param>
<param name="key">The value of the item with the specified <paramref name="propertyName" /> to find.</param>
<summary>Returns the index of the item in the list with the specified property name and value.</summary>
<returns>The zero-based index of the item with the specified property name and value.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.Find%2A> method can only be used when the underlying list is an <xref:System.ComponentModel.IBindingList> with searching implemented. This method simply refers the request to the underlying list's <xref:System.ComponentModel.IBindingList.Find%2A?displayProperty=nameWithType> method. For example, if the underlying data source is a <xref:System.Data.DataSet>, <xref:System.Data.DataTable>, or <xref:System.Data.DataView>, this method converts `propertyName` to a <xref:System.ComponentModel.PropertyDescriptor> and calls the <xref:System.Data.DataView.System%23ComponentModel%23IBindingList%23Find%2A> method. The behavior of <xref:System.Windows.Forms.BindingSource.Find%2A>, such as the value returned if no matching item is found, depends on the implementation of the method in the underlying list.
The property name comparison is case-insensitive.
## Examples
The following example shows how to use the <xref:System.Windows.Forms.BindingSource.Find%2A> method with a <xref:System.Data.DataView>. To run this example, paste the code into a Windows Form and call `PopulateDataViewAndFind` from the form's constructor or <xref:System.Windows.Forms.Form.Load> event-handling method. Your form should import the <xref:System.Xml> and <xref:System.IO> namespaces.
[!code-csharp[System.Windows.Forms.BindingSourceMethods#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/CS/Form1.cs#1)]
[!code-vb[System.Windows.Forms.BindingSourceMethods#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/VB/Form1.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The underlying list is not a <see cref="T:System.ComponentModel.IBindingList" /> with searching functionality implemented.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="propertyName" /> does not match a property in the list.</exception>
</Docs>
</Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="C#" Value="public virtual System.Collections.IEnumerator GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.IEnumerator GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetEnumerator () As IEnumerator" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Collections::IEnumerator ^ GetEnumerator();" />
<MemberSignature Language="F#" Value="abstract member GetEnumerator : unit -&gt; System.Collections.IEnumerator&#xA;override this.GetEnumerator : unit -&gt; System.Collections.IEnumerator" Usage="bindingSource.GetEnumerator " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IEnumerable.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Retrieves an enumerator for the <see cref="P:System.Windows.Forms.BindingSource.List" />.</summary>
<returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="P:System.Windows.Forms.BindingSource.List" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetItemProperties">
<MemberSignature Language="C#" Value="public virtual System.ComponentModel.PropertyDescriptorCollection GetItemProperties (System.ComponentModel.PropertyDescriptor[] listAccessors);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.ComponentModel.PropertyDescriptorCollection GetItemProperties(class System.ComponentModel.PropertyDescriptor[] listAccessors) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.GetItemProperties(System.ComponentModel.PropertyDescriptor[])" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetItemProperties (listAccessors As PropertyDescriptor()) As PropertyDescriptorCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::ComponentModel::PropertyDescriptorCollection ^ GetItemProperties(cli::array &lt;System::ComponentModel::PropertyDescriptor ^&gt; ^ listAccessors);" />
<MemberSignature Language="F#" Value="abstract member GetItemProperties : System.ComponentModel.PropertyDescriptor[] -&gt; System.ComponentModel.PropertyDescriptorCollection&#xA;override this.GetItemProperties : System.ComponentModel.PropertyDescriptor[] -&gt; System.ComponentModel.PropertyDescriptorCollection" Usage="bindingSource.GetItemProperties listAccessors" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[])</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.PropertyDescriptorCollection</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="listAccessors" Type="System.ComponentModel.PropertyDescriptor[]" />
</Parameters>
<Docs>
<param name="listAccessors">An array of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects to find in the list as bindable.</param>
<summary>Retrieves an array of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects representing the bindable properties of the data source list type.</summary>
<returns>An array of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects that represents the properties on this list type used to bind data.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:System.Windows.Forms.ListBindingHelper" />
</Docs>
</Member>
<Member MemberName="GetListName">
<MemberSignature Language="C#" Value="public virtual string GetListName (System.ComponentModel.PropertyDescriptor[] listAccessors);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string GetListName(class System.ComponentModel.PropertyDescriptor[] listAccessors) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.GetListName(System.ComponentModel.PropertyDescriptor[])" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetListName (listAccessors As PropertyDescriptor()) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::String ^ GetListName(cli::array &lt;System::ComponentModel::PropertyDescriptor ^&gt; ^ listAccessors);" />
<MemberSignature Language="F#" Value="abstract member GetListName : System.ComponentModel.PropertyDescriptor[] -&gt; string&#xA;override this.GetListName : System.ComponentModel.PropertyDescriptor[] -&gt; string" Usage="bindingSource.GetListName listAccessors" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[])</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="listAccessors" Type="System.ComponentModel.PropertyDescriptor[]" />
</Parameters>
<Docs>
<param name="listAccessors">An array of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects to find in the list as bindable.</param>
<summary>Gets the name of the list supplying data for the binding.</summary>
<returns>The name of the list supplying the data for binding.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:System.Windows.Forms.ListBindingHelper" />
</Docs>
</Member>
<Member MemberName="GetRelatedCurrencyManager">
<MemberSignature Language="C#" Value="public virtual System.Windows.Forms.CurrencyManager GetRelatedCurrencyManager (string dataMember);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Windows.Forms.CurrencyManager GetRelatedCurrencyManager(string dataMember) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.GetRelatedCurrencyManager(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetRelatedCurrencyManager (dataMember As String) As CurrencyManager" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Windows::Forms::CurrencyManager ^ GetRelatedCurrencyManager(System::String ^ dataMember);" />
<MemberSignature Language="F#" Value="abstract member GetRelatedCurrencyManager : string -&gt; System.Windows.Forms.CurrencyManager&#xA;override this.GetRelatedCurrencyManager : string -&gt; System.Windows.Forms.CurrencyManager" Usage="bindingSource.GetRelatedCurrencyManager dataMember" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Forms.ICurrencyManagerProvider.GetRelatedCurrencyManager(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.CurrencyManager</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataMember" Type="System.String" />
</Parameters>
<Docs>
<param name="dataMember">The name of column or list, within the data source to retrieve the currency manager for.</param>
<summary>Gets the related currency manager for the specified data member.</summary>
<returns>The related <see cref="T:System.Windows.Forms.CurrencyManager" /> for the specified data member.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If `dataMember` is `null` or an empty string (""), <xref:System.Windows.Forms.BindingSource.GetRelatedCurrencyManager%2A> returns the main currency manager; otherwise, it checks for another <xref:System.Windows.Forms.BindingSource> bound to the specified data member and returns its currency manager.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IndexOf">
<MemberSignature Language="C#" Value="public virtual int IndexOf (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 IndexOf(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.IndexOf(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function IndexOf (value As Object) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual int IndexOf(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member IndexOf : obj -&gt; int&#xA;override this.IndexOf : obj -&gt; int" Usage="bindingSource.IndexOf value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.IndexOf(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.Object" /> to locate in the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property. The value can be <see langword="null" />.</param>
<summary>Searches for the specified object and returns the index of the first occurrence within the entire list.</summary>
<returns>The zero-based index of the first occurrence of the <paramref name="value" /> parameter; otherwise, -1 if <paramref name="value" /> is not in the list.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Although the implementation is dependent on the underlying list's `IndexOf` method, typically the following characteristics apply:
- The <xref:System.Windows.Forms.BindingSource.List%2A> is searched starting at the first element and ending at the last element.
- The underlying method performs a linear search; therefore, the average execution time is proportional to the value of the <xref:System.Windows.Forms.BindingSource.Count%2A> property.
- The underlying method determines equality by calling the <xref:System.Object.Equals%2A> method.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="M:System.Windows.Forms.BindingSource.Contains(System.Object)" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Item(System.Int32)" />
<altmember cref="M:System.Windows.Forms.BindingSource.Find(System.ComponentModel.PropertyDescriptor,System.Object)" />
</Docs>
</Member>
<Member MemberName="Insert">
<MemberSignature Language="C#" Value="public virtual void Insert (int index, object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Insert(int32 index, object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Insert(System.Int32,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Insert (index As Integer, value As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Insert(int index, System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Insert : int * obj -&gt; unit&#xA;override this.Insert : int * obj -&gt; unit" Usage="bindingSource.Insert (index, value)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Insert(System.Int32,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="index">The zero-based index at which <paramref name="value" /> should be inserted.</param>
<param name="value">The <see cref="T:System.Object" /> to insert. The value can be <see langword="null" />.</param>
<summary>Inserts an item into the list at the specified index.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is less than zero or greater than <see cref="P:System.Windows.Forms.BindingSource.Count" />.</exception>
<exception cref="T:System.NotSupportedException">The list is read-only or has a fixed size.</exception>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.IsReadOnly" />
<altmember cref="P:System.Windows.Forms.BindingSource.IsFixedSize" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="M:System.Windows.Forms.BindingSource.Add(System.Object)" />
<altmember cref="M:System.Windows.Forms.BindingSource.RemoveCurrent" />
</Docs>
</Member>
<Member MemberName="IsBindingSuspended">
<MemberSignature Language="C#" Value="public bool IsBindingSuspended { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsBindingSuspended" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.IsBindingSuspended" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsBindingSuspended As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsBindingSuspended { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsBindingSuspended : bool" Usage="System.Windows.Forms.BindingSource.IsBindingSuspended" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the list binding is suspended.</summary>
<value>
<see langword="true" /> to indicate the binding is suspended; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsFixedSize">
<MemberSignature Language="C#" Value="public virtual bool IsFixedSize { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsFixedSize" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.IsFixedSize" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property IsFixedSize As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool IsFixedSize { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsFixedSize : bool" Usage="System.Windows.Forms.BindingSource.IsFixedSize" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IList.IsFixedSize</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the underlying list has a fixed size.</summary>
<value>
<see langword="true" /> if the underlying list has a fixed size; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the list has a fixed size, it does not allow the addition or removal of elements after the list has been created, but you can modify existing elements.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsReadOnly">
<MemberSignature Language="C#" Value="public virtual bool IsReadOnly { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsReadOnly" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.IsReadOnly" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property IsReadOnly As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool IsReadOnly { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsReadOnly : bool" Usage="System.Windows.Forms.BindingSource.IsReadOnly" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IList.IsReadOnly</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the underlying list is read-only.</summary>
<value>
<see langword="true" /> if the list is read-only; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A list that is read-only does not allow the addition, removal, or modification of any list items after the list is created.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsSorted">
<MemberSignature Language="C#" Value="public virtual bool IsSorted { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsSorted" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.IsSorted" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property IsSorted As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool IsSorted { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsSorted : bool" Usage="System.Windows.Forms.BindingSource.IsSorted" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ComponentModel.IBindingList.IsSorted</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the items in the underlying list are sorted.</summary>
<value>
<see langword="true" /> if the list is an <see cref="T:System.ComponentModel.IBindingList" /> and is sorted; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Forms.BindingSource.IsSorted%2A> always returns `false` if the list is not an <xref:System.ComponentModel.IBindingList>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsSynchronized">
<MemberSignature Language="C#" Value="public virtual bool IsSynchronized { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsSynchronized" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.IsSynchronized" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property IsSynchronized As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool IsSynchronized { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsSynchronized : bool" Usage="System.Windows.Forms.BindingSource.IsSynchronized" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.IsSynchronized</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether access to the collection is synchronized (thread safe).</summary>
<value>
<see langword="true" /> to indicate the list is synchronized; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public virtual object this[int index] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Item(int32)" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.Item(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Default Public Overridable Property Item(index As Integer) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Object ^ default[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.Item(int) : obj with get, set" Usage="System.Windows.Forms.BindingSource.Item" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IList.Item(System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The zero-based index of the element to retrieve.</param>
<summary>Gets or sets the list element at the specified index.</summary>
<value>The element at the specified index.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.Item%2A> property represents the indexer for this class. It accepts `null` as a valid value and allows duplicate items within the list.
Setting a value will raise the <xref:System.Windows.Forms.BindingSource.ListChanged> event.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is less than zero or is equal to or greater than <see cref="P:System.Windows.Forms.BindingSource.Count" />.</exception>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
</Docs>
</Member>
<Member MemberName="List">
<MemberSignature Language="C#" Value="public System.Collections.IList List { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IList List" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.List" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property List As IList" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::IList ^ List { System::Collections::IList ^ get(); };" />
<MemberSignature Language="F#" Value="member this.List : System.Collections.IList" Usage="System.Windows.Forms.BindingSource.List" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Collections.IList</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the list that the connector is bound to.</summary>
<value>An <see cref="T:System.Collections.IList" /> that represents the list, or <see langword="null" /> if there is no underlying list associated with this <see cref="T:System.Windows.Forms.BindingSource" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource> class uniformly handles different data sources. Ideally the <xref:System.Windows.Forms.BindingSource.List%2A> property should be set to a general <xref:System.Collections.IList>. However, sometimes it may be necessary to cast this property to a more specific type. The following table shows the underlying list type, which depends on the type or value of the data source.
|Data source type|Underlying list description|
|----------------------|---------------------------------|
|<xref:System.Windows.Forms.BindingSource.DataSource%2A> and <xref:System.Windows.Forms.BindingSource.DataMember%2A> are `null`|An empty <xref:System.Collections.ArrayList>.|
|<xref:System.Windows.Forms.BindingSource.DataSource%2A> is `null`, but <xref:System.Windows.Forms.BindingSource.DataMember%2A> is not `null`|None; an attempt to get the <xref:System.Windows.Forms.BindingSource.List%2A> will throw an <xref:System.ArgumentException>.|
|An <xref:System.Array> instance|An <xref:System.Array>.|
|An <xref:System.ComponentModel.IListSource> instance|The return value from a call to the <xref:System.ComponentModel.IListSource.GetList%2A> method of this <xref:System.ComponentModel.IListSource> instance.|
|An <xref:System.ComponentModel.IBindingList> instance|An <xref:System.ComponentModel.IBindingList>.|
|An <xref:System.Collections.IList> instance|An <xref:System.Collections.IList>.|
|A non-<xref:System.Collections.IList> instance of type "T"|A <xref:System.ComponentModel.BindingList%601> with one element.|
|An <xref:System.ComponentModel.ICustomTypeDescriptor> instance|An <xref:System.Collections.ArrayList> with one element.|
|An <xref:System.Collections.IEnumerable>|An <xref:System.Collections.ArrayList> with the elements copied over.|
|The <xref:System.Array> type with <xref:System.Windows.Forms.BindingSource.DataMember%2A> of item type "T"|A <xref:System.ComponentModel.BindingList%601>.|
|A <xref:System.Type> that represents an <xref:System.ComponentModel.IListSource> or <xref:System.ComponentModel.ITypedList>|An instance created by a call to the <xref:System.Activator.CreateInstance%28System.Type%29> method of the <xref:System.Activator> class. A <xref:System.NotSupportedException> may be thrown.|
|The <xref:System.Collections.IList> type with <xref:System.Windows.Forms.BindingSource.DataMember%2A> of item type "T"<br /><br /> -or-<br /><br /> A non-<xref:System.Collections.IList> type|A <xref:System.ComponentModel.BindingList%601>.|
|The <xref:System.ComponentModel.ICustomTypeDescriptor> type|None; an attempt to get the <xref:System.Windows.Forms.BindingSource.List%2A> will throw an <xref:System.NotSupportedException>.|
If the type retrieved is the <xref:System.Collections.IList> interface, the underlying collection may be more complex, such as an <xref:System.Collections.ArrayList> or <xref:System.Data.DataView> class.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.BindingSource.List%2A>, <xref:System.Windows.Forms.BindingSource.RemoveAt%2A>, and <xref:System.Windows.Forms.BindingSource.Count%2A> members. To run this example, paste the code into a form that contains a <xref:System.Windows.Forms.BindingSource> named `BindingSource1`, two labels named `label1` and `label2`, and a button named `button1`. Associate the `button1_Click` method with the <xref:System.Windows.Forms.Control.Click> event for `button1`. Visual Basic users will need to add a reference to System.Data.dll.
[!code-csharp[System.Windows.Forms.DataConnectorFilterAndSort#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorFilterAndSort/CS/form1.cs#2)]
[!code-vb[System.Windows.Forms.DataConnectorFilterAndSort#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorFilterAndSort/VB/form1.vb#2)]
]]></format>
</remarks>
<altmember cref="T:System.Collections.IList" />
<altmember cref="P:System.Windows.Forms.BindingSource.Item(System.Int32)" />
</Docs>
</Member>
<Member MemberName="ListChanged">
<MemberSignature Language="C#" Value="public event System.ComponentModel.ListChangedEventHandler ListChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.ComponentModel.ListChangedEventHandler ListChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.ListChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event ListChanged As ListChangedEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual event System::ComponentModel::ListChangedEventHandler ^ ListChanged;" />
<MemberSignature Language="F#" Value="member this.ListChanged : System.ComponentModel.ListChangedEventHandler " Usage="member this.ListChanged : System.ComponentModel.ListChangedEventHandler " />
<MemberType>Event</MemberType>
<Implements>
<InterfaceMember>E:System.ComponentModel.IBindingList.ListChanged</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.ListChangedEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the underlying list changes or an item in the list changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.ListChanged> event occurs when there is a change to the membership or metadata of the underlying list represented by the <xref:System.Windows.Forms.BindingSource.List%2A> property. For example, this event is raised when items are added, removed, or moved, or the <xref:System.Windows.Forms.BindingSource.DataSource%2A> or <xref:System.Windows.Forms.BindingSource.DataMember%2A> properties change. The values of the <xref:System.Windows.Forms.BindingSource.Sort%2A> and <xref:System.Windows.Forms.BindingSource.Filter%2A> properties will persist when this event occurs.
This event can be completely suppressed by setting the <xref:System.Windows.Forms.BindingSource.RaiseListChangedEvents%2A> property to `false`. For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
## Examples
The following code example demonstrates handling the <xref:System.Windows.Forms.BindingSource.ListChanged> event of the <xref:System.Windows.Forms.BindingSource> component to detect when the <xref:System.Windows.Forms.BindingSource> component's underlying list is changed.
[!code-cpp[System.Windows.Forms.DataConnector.ItemChangedEventMode#9](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/CPP/form1.cpp#9)]
[!code-csharp[System.Windows.Forms.DataConnector.ItemChangedEventMode#9](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/CS/form1.cs#9)]
[!code-vb[System.Windows.Forms.DataConnector.ItemChangedEventMode#9](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/VB/form1.vb#9)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnListChanged(System.ComponentModel.ListChangedEventArgs)" />
<altmember cref="P:System.Windows.Forms.BindingSource.RaiseListChangedEvents" />
<altmember cref="T:System.ComponentModel.ListChangedType" />
<altmember cref="E:System.Windows.Forms.BindingSource.CurrentChanged" />
<altmember cref="E:System.Windows.Forms.BindingSource.CurrentItemChanged" />
</Docs>
</Member>
<Member MemberName="MoveFirst">
<MemberSignature Language="C#" Value="public void MoveFirst ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void MoveFirst() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.MoveFirst" />
<MemberSignature Language="VB.NET" Value="Public Sub MoveFirst ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void MoveFirst();" />
<MemberSignature Language="F#" Value="member this.MoveFirst : unit -&gt; unit" Usage="bindingSource.MoveFirst " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Moves to the first item in the list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Changes the current value of the <xref:System.Windows.Forms.BindingSource.Position%2A> property to 0, the first item in the underlying data source.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.BindingSource.MoveNext%2A>, <xref:System.Windows.Forms.BindingSource.MoveFirst%2A>, <xref:System.Windows.Forms.BindingSource.Current%2A>, and <xref:System.Windows.Forms.BindingSource.Position%2A> members. To run this example, paste the code into a form that imports the <xref:System.Drawing.Drawing2D> namespace and contains a <xref:System.Windows.Forms.BindingSource> named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the <xref:System.Windows.Forms.Form.Load> and <xref:System.Windows.Forms.Control.Paint> events for the form, and associate the `button1_click` method with the <xref:System.Windows.Forms.Control.Click> event for `button1`. Visual Basic users will need to add a reference to System.Data.dll.
[!code-cpp[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/cpp/form1.cpp#1)]
[!code-csharp[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/CS/form1.cs#1)]
[!code-vb[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/VB/form1.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveNext" />
<altmember cref="M:System.Windows.Forms.BindingSource.MovePrevious" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveLast" />
</Docs>
</Member>
<Member MemberName="MoveLast">
<MemberSignature Language="C#" Value="public void MoveLast ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void MoveLast() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.MoveLast" />
<MemberSignature Language="VB.NET" Value="Public Sub MoveLast ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void MoveLast();" />
<MemberSignature Language="F#" Value="member this.MoveLast : unit -&gt; unit" Usage="bindingSource.MoveLast " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Moves to the last item in the list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Changes the current value of the <xref:System.Windows.Forms.BindingSource.Position%2A> property to the index of the last item in the underlying data source, which is equal to the value of the <xref:System.Windows.Forms.BindingSource.Count%2A> property minus 1.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveNext" />
<altmember cref="M:System.Windows.Forms.BindingSource.MovePrevious" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveFirst" />
</Docs>
</Member>
<Member MemberName="MoveNext">
<MemberSignature Language="C#" Value="public void MoveNext ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void MoveNext() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.MoveNext" />
<MemberSignature Language="VB.NET" Value="Public Sub MoveNext ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void MoveNext();" />
<MemberSignature Language="F#" Value="member this.MoveNext : unit -&gt; unit" Usage="bindingSource.MoveNext " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Moves to the next item in the list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Changes the current value of the <xref:System.Windows.Forms.BindingSource.Position%2A> property to the next item in the underlying data source.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.BindingSource.MoveNext%2A>, <xref:System.Windows.Forms.BindingSource.MoveFirst%2A>, <xref:System.Windows.Forms.BindingSource.Current%2A>, and <xref:System.Windows.Forms.BindingSource.Position%2A> members. To run this example, paste the code into a form that imports the <xref:System.Drawing.Drawing2D> namespace and contains a <xref:System.Windows.Forms.BindingSource> named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the <xref:System.Windows.Forms.Form.Load> and <xref:System.Windows.Forms.Control.Paint> events for the form, and associate the `button1_click` method with the <xref:System.Windows.Forms.Control.Click> event for `button1`. Visual Basic users will need to add a reference to System.Data.dll.
[!code-cpp[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/cpp/form1.cpp#1)]
[!code-csharp[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/CS/form1.cs#1)]
[!code-vb[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/VB/form1.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveLast" />
<altmember cref="M:System.Windows.Forms.BindingSource.MovePrevious" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveFirst" />
</Docs>
</Member>
<Member MemberName="MovePrevious">
<MemberSignature Language="C#" Value="public void MovePrevious ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void MovePrevious() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.MovePrevious" />
<MemberSignature Language="VB.NET" Value="Public Sub MovePrevious ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void MovePrevious();" />
<MemberSignature Language="F#" Value="member this.MovePrevious : unit -&gt; unit" Usage="bindingSource.MovePrevious " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Moves to the previous item in the list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method changes the current value of the <xref:System.Windows.Forms.BindingSource.Position%2A> property to the previous item in the underlying data source.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveLast" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveNext" />
<altmember cref="M:System.Windows.Forms.BindingSource.MoveFirst" />
</Docs>
</Member>
<Member MemberName="OnAddingNew">
<MemberSignature Language="C#" Value="protected virtual void OnAddingNew (System.ComponentModel.AddingNewEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnAddingNew(class System.ComponentModel.AddingNewEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnAddingNew(System.ComponentModel.AddingNewEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnAddingNew (e As AddingNewEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnAddingNew(System::ComponentModel::AddingNewEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnAddingNew : System.ComponentModel.AddingNewEventArgs -&gt; unit&#xA;override this.OnAddingNew : System.ComponentModel.AddingNewEventArgs -&gt; unit" Usage="bindingSource.OnAddingNew e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.ComponentModel.AddingNewEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.AddingNew" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnAddingNew%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnAddingNew(System.ComponentModel.AddingNewEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnAddingNew(System.ComponentModel.AddingNewEventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Windows.Forms.BindingSource.AddingNew" />
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnListChanged(System.ComponentModel.ListChangedEventArgs)" />
</Docs>
</Member>
<Member MemberName="OnBindingComplete">
<MemberSignature Language="C#" Value="protected virtual void OnBindingComplete (System.Windows.Forms.BindingCompleteEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnBindingComplete(class System.Windows.Forms.BindingCompleteEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnBindingComplete(System.Windows.Forms.BindingCompleteEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnBindingComplete (e As BindingCompleteEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnBindingComplete(System::Windows::Forms::BindingCompleteEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnBindingComplete : System.Windows.Forms.BindingCompleteEventArgs -&gt; unit&#xA;override this.OnBindingComplete : System.Windows.Forms.BindingCompleteEventArgs -&gt; unit" Usage="bindingSource.OnBindingComplete e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Windows.Forms.BindingCompleteEventArgs" />
</Parameters>
<Docs>
<param name="e">A <see cref="T:System.Windows.Forms.BindingCompleteEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.BindingComplete" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnBindingComplete%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnBindingComplete(System.Windows.Forms.BindingCompleteEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnBindingComplete(System.Windows.Forms.BindingCompleteEventArgs)" /> method so that registered delegates receive the event.</para>
</block>
</Docs>
</Member>
<Member MemberName="OnCurrentChanged">
<MemberSignature Language="C#" Value="protected virtual void OnCurrentChanged (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnCurrentChanged(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnCurrentChanged(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnCurrentChanged (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnCurrentChanged(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnCurrentChanged : EventArgs -&gt; unit&#xA;override this.OnCurrentChanged : EventArgs -&gt; unit" Usage="bindingSource.OnCurrentChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.CurrentChanged" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnCurrentChanged%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnCurrentChanged(System.EventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnCurrentChanged(System.EventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Windows.Forms.BindingSource.CurrentChanged" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnCurrentItemChanged(System.EventArgs)" />
</Docs>
</Member>
<Member MemberName="OnCurrentItemChanged">
<MemberSignature Language="C#" Value="protected virtual void OnCurrentItemChanged (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnCurrentItemChanged(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnCurrentItemChanged(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnCurrentItemChanged (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnCurrentItemChanged(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnCurrentItemChanged : EventArgs -&gt; unit&#xA;override this.OnCurrentItemChanged : EventArgs -&gt; unit" Usage="bindingSource.OnCurrentItemChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.CurrentItemChanged" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnCurrentItemChanged%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnCurrentItemChanged(System.EventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnCurrentItemChanged(System.EventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="E:System.Windows.Forms.BindingSource.CurrentItemChanged" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnCurrentChanged(System.EventArgs)" />
</Docs>
</Member>
<Member MemberName="OnDataError">
<MemberSignature Language="C#" Value="protected virtual void OnDataError (System.Windows.Forms.BindingManagerDataErrorEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnDataError(class System.Windows.Forms.BindingManagerDataErrorEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnDataError(System.Windows.Forms.BindingManagerDataErrorEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnDataError (e As BindingManagerDataErrorEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnDataError(System::Windows::Forms::BindingManagerDataErrorEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnDataError : System.Windows.Forms.BindingManagerDataErrorEventArgs -&gt; unit&#xA;override this.OnDataError : System.Windows.Forms.BindingManagerDataErrorEventArgs -&gt; unit" Usage="bindingSource.OnDataError e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Windows.Forms.BindingManagerDataErrorEventArgs" />
</Parameters>
<Docs>
<param name="e">A <see cref="T:System.Windows.Forms.BindingManagerDataErrorEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.DataError" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnDataError%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnDataError(System.Windows.Forms.BindingManagerDataErrorEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnDataError(System.Windows.Forms.BindingManagerDataErrorEventArgs)" /> method so that registered delegates receive the event.</para>
</block>
</Docs>
</Member>
<Member MemberName="OnDataMemberChanged">
<MemberSignature Language="C#" Value="protected virtual void OnDataMemberChanged (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnDataMemberChanged(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnDataMemberChanged(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnDataMemberChanged (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnDataMemberChanged(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnDataMemberChanged : EventArgs -&gt; unit&#xA;override this.OnDataMemberChanged : EventArgs -&gt; unit" Usage="bindingSource.OnDataMemberChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.DataMemberChanged" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnDataMemberChanged%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnDataMemberChanged(System.EventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnDataMemberChanged(System.EventArgs)" /> method so that registered delegates receive the event.
The <see cref="M:System.Windows.Forms.BindingSource.OnDataMemberChanged(System.EventArgs)" /> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.</para>
</block>
<altmember cref="E:System.Windows.Forms.BindingSource.DataMemberChanged" />
<altmember cref="P:System.Windows.Forms.BindingSource.DataMember" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnDataSourceChanged(System.EventArgs)" />
</Docs>
</Member>
<Member MemberName="OnDataSourceChanged">
<MemberSignature Language="C#" Value="protected virtual void OnDataSourceChanged (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnDataSourceChanged(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnDataSourceChanged(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnDataSourceChanged (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnDataSourceChanged(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnDataSourceChanged : EventArgs -&gt; unit&#xA;override this.OnDataSourceChanged : EventArgs -&gt; unit" Usage="bindingSource.OnDataSourceChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.DataSourceChanged" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnDataSourceChanged%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnDataSourceChanged(System.EventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnDataSourceChanged(System.EventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Windows.Forms.BindingSource.DataSourceChanged" />
<altmember cref="P:System.Windows.Forms.BindingSource.DataSource" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnDataMemberChanged(System.EventArgs)" />
</Docs>
</Member>
<Member MemberName="OnListChanged">
<MemberSignature Language="C#" Value="protected virtual void OnListChanged (System.ComponentModel.ListChangedEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnListChanged(class System.ComponentModel.ListChangedEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnListChanged(System.ComponentModel.ListChangedEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnListChanged (e As ListChangedEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnListChanged(System::ComponentModel::ListChangedEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnListChanged : System.ComponentModel.ListChangedEventArgs -&gt; unit&#xA;override this.OnListChanged : System.ComponentModel.ListChangedEventArgs -&gt; unit" Usage="bindingSource.OnListChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.ComponentModel.ListChangedEventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.ListChanged" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnListChanged%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnListChanged(System.ComponentModel.ListChangedEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnListChanged(System.ComponentModel.ListChangedEventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Windows.Forms.BindingSource.ListChanged" />
<altmember cref="E:System.Windows.Forms.BindingSource.DataSourceChanged" />
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
</Docs>
</Member>
<Member MemberName="OnPositionChanged">
<MemberSignature Language="C#" Value="protected virtual void OnPositionChanged (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnPositionChanged(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.OnPositionChanged(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnPositionChanged (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnPositionChanged(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnPositionChanged : EventArgs -&gt; unit&#xA;override this.OnPositionChanged : EventArgs -&gt; unit" Usage="bindingSource.OnPositionChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">A <see cref="T:System.ComponentModel.ListChangedEventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Windows.Forms.BindingSource.PositionChanged" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
The <xref:System.Windows.Forms.BindingSource.OnPositionChanged%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding <see cref="M:System.Windows.Forms.BindingSource.OnPositionChanged(System.EventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.BindingSource.OnPositionChanged(System.EventArgs)" /> method so that registered delegates receive the event.</para>
</block>
<altmember cref="E:System.Windows.Forms.BindingSource.PositionChanged" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnCurrentChanged(System.EventArgs)" />
</Docs>
</Member>
<Member MemberName="Position">
<MemberSignature Language="C#" Value="public int Position { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Position" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.Position" />
<MemberSignature Language="VB.NET" Value="Public Property Position As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Position { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.Position : int with get, set" Usage="System.Windows.Forms.BindingSource.Position" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(-1)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the index of the current item in the underlying list.</summary>
<value>A zero-based index that specifies the position of the current item in the underlying list.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When setting the <xref:System.Windows.Forms.BindingSource.Position%2A> property, out-of-range values are treated in the following manner:
- Negative values are treated as 0.
- Values greater than or equal to <xref:System.Windows.Forms.BindingSource.Count%2A> are treated as <xref:System.Windows.Forms.BindingSource.Count%2A> minus 1.
Changing the <xref:System.Windows.Forms.BindingSource.Position%2A> property will adjust the <xref:System.Windows.Forms.BindingSource.Current%2A> property likewise.
## Examples
The following code example demonstrates the <xref:System.Windows.Forms.BindingSource.MoveNext%2A>, <xref:System.Windows.Forms.BindingSource.MoveFirst%2A>, <xref:System.Windows.Forms.BindingSource.Current%2A>, and <xref:System.Windows.Forms.BindingSource.Position%2A> members. To run this example, paste the code into a form that imports the <xref:System.Drawing.Drawing2D> namespace and contains a <xref:System.Windows.Forms.BindingSource> named `BindingSource1` and a button named `button1`. Associate the `Form1_Load` and `Form1_Paint` methods with the <xref:System.Windows.Forms.Form.Load> and <xref:System.Windows.Forms.Control.Paint> events for the form, and associate the `button1_click` method with the <xref:System.Windows.Forms.Control.Click> event for `button1`. Visual Basic users will need to add a reference to System.Data.dll.
[!code-cpp[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/cpp/form1.cpp#1)]
[!code-csharp[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/CS/form1.cs#1)]
[!code-vb[System.Windows.Forms.DataConnectorCurrent#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorCurrent/VB/form1.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
</Docs>
</Member>
<Member MemberName="PositionChanged">
<MemberSignature Language="C#" Value="public event EventHandler PositionChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler PositionChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.PositionChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event PositionChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ PositionChanged;" />
<MemberSignature Language="F#" Value="member this.PositionChanged : EventHandler " Usage="member this.PositionChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs after the value of the <see cref="P:System.Windows.Forms.BindingSource.Position" /> property has changed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.PositionChanged> event occurs after the <xref:System.Windows.Forms.BindingSource.Position%2A> property has changed.
For more information about handling events, see [Handling and Raising Events](~/docs/standard/events/index.md).
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnPositionChanged(System.EventArgs)" />
</Docs>
</Member>
<Member MemberName="RaiseListChangedEvents">
<MemberSignature Language="C#" Value="public bool RaiseListChangedEvents { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool RaiseListChangedEvents" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.RaiseListChangedEvents" />
<MemberSignature Language="VB.NET" Value="Public Property RaiseListChangedEvents As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool RaiseListChangedEvents { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.RaiseListChangedEvents : bool with get, set" Usage="System.Windows.Forms.BindingSource.RaiseListChangedEvents" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether <see cref="E:System.Windows.Forms.BindingSource.ListChanged" /> events should be raised.</summary>
<value>
<see langword="true" /> if <see cref="E:System.Windows.Forms.BindingSource.ListChanged" /> events should be raised; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the <xref:System.Windows.Forms.BindingSource.RaiseListChangedEvents%2A> property is `false`, it suspends the raising of <xref:System.Windows.Forms.BindingSource.ListChanged> events. This event indicates that the bound list has been modified in some way, including adding, deleting, inserting, or modifying items.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="E:System.Windows.Forms.BindingSource.ListChanged" />
<altmember cref="E:System.Windows.Forms.BindingSource.CurrentItemChanged" />
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public virtual void Remove (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Remove(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Remove(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Remove (value As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Remove(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Remove : obj -&gt; unit&#xA;override this.Remove : obj -&gt; unit" Usage="bindingSource.Remove value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Remove(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The item to remove from the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property.</param>
<summary>Removes the specified item from the list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.Remove%2A> method causes the list to be searched for the `value` parameter. If found, this method will attempt to remove the item from the <xref:System.Windows.Forms.BindingSource.List%2A>. This attempt will fail if the list has a fixed size or is read-only. These two conditions can be tested with the <xref:System.Windows.Forms.BindingSource.IsFixedSize%2A> and <xref:System.Windows.Forms.BindingSource.IsReadOnly%2A> properties, respectively.
This method raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The underlying list has a fixed size or is read-only.</exception>
<altmember cref="M:System.Windows.Forms.BindingSource.RemoveAt(System.Int32)" />
<altmember cref="M:System.Windows.Forms.BindingSource.RemoveCurrent" />
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.IsFixedSize" />
<altmember cref="P:System.Windows.Forms.BindingSource.IsReadOnly" />
<altmember cref="M:System.Windows.Forms.BindingSource.Insert(System.Int32,System.Object)" />
<altmember cref="M:System.Windows.Forms.BindingSource.Add(System.Object)" />
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
</Docs>
</Member>
<Member MemberName="RemoveAt">
<MemberSignature Language="C#" Value="public virtual void RemoveAt (int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RemoveAt(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.RemoveAt(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub RemoveAt (index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void RemoveAt(int index);" />
<MemberSignature Language="F#" Value="abstract member RemoveAt : int -&gt; unit&#xA;override this.RemoveAt : int -&gt; unit" Usage="bindingSource.RemoveAt index" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.RemoveAt(System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The zero-based index of the item to remove.</param>
<summary>Removes the item at the specified index in the list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
These two conditions can be tested with the <xref:System.Windows.Forms.BindingSource.IsFixedSize%2A> and <xref:System.Windows.Forms.BindingSource.IsReadOnly