BindingSource bindingSource1 = new BindingSource(); bindingSource1.DataSource = myDataTable; // Move to the next item in the BindingSource bindingSource1.MoveNext();
BindingSource bindingSource2 = new BindingSource(); bindingSource2.DataSource = myCollection; // Move to the next item in the BindingSource if(bindingSource2.Current != null) bindingSource2.MoveNext();In this example, we create a new BindingSource object and set its DataSource property to a collection. We then check if the Current property of the BindingSource is not null before calling the MoveNext method to move to the next item in the data source. Package/library: System.ComponentModel Overall, the BindingSource.MoveNext method is a useful method for navigating through data in a data source. It is part of the System.Windows.Forms and System.ComponentModel libraries.