What is the best way to copy a BindingList?
Just use ForEach()? Or are there better ways?
BindingList has a constructor which can take an IList. And BindingList implements IList. So you can just do the following:
BindingList newBL = new BindingList(oldBL);
Of course that creates a second list that just points at the same objects. If you actually want to clone the objects in the list then you have to do more work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With