Convert IList to BindingList

前端 未结 1 1232
挽巷
挽巷 2021-01-04 00:14

How can I cast an IList list to BindingList?

相关标签:
1条回答
  • 2021-01-04 00:32
    var yourList = new List<Customer>();
    var listBinding = new BindingList<Customer>(yourList);
    

    BindingList Constructors

    You don't need to do a cast, just provide the BindingList<T> class constructor with IList<T>, which you have.

    0 讨论(0)
提交回复
热议问题