for a simple binding like a textbox to another textbox,
Code:
Binding b=new Binding("Text",textBoxA,"Text");
textBoxB.DataBindings.Add(b);
for a complex binding you should give an ICollection as the second parametre with a suitable datamember,for example I bind a dataset to a textbox
Code:
string[] strings=new string[]{"number1","number2"};
Binding b=new Binding("Text",dataSet.Tables[0],"ColumnName");
textBox.DataBindings.Add(b);
//for changing the position of datasource(collection)
//....
this.BindingContext[dataSet.Tables[0]].Position++;
or binding an array to a textbox
Code:
string[] strings=new string[]{"number1","number2"};
Binding b=new Binding("Text",strings,null);
textBox.DataBindings.Add(b);
//then for changing the position of the datasource(collection)
this.BindingContext[strings].Position++;
you should pass the proper parameters to the the dataSource & dataMember otherwise it won't work.