I have many classes sharing a interface.I have also created a BindingList consist of objects created from these classes.
Now i want to use this binding list as a Datasource for a Datagridview.
would this work?c开发者_运维技巧an please someone give me some example.
Oh wait - can you just create a BindingList of IMyInterface ?
myList = new List<IMyInterface>();
myList.Add(new Foo());
myList.Add(new Bar());
myDataGridView.DataSource = myList;
Foo and Bar implement IMyInterface
精彩评论