Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将IList<Customer>列表投射到BindingList<Customer>?
IList<Customer>
BindingList<Customer>
var yourList = new List<Customer>(); var listBinding = new BindingList<Customer>(yourList);
绑定列表构造函数
您不需要进行强制转换,只需为BindingList<T>类构造函数提供IList<T>您拥有的 .
BindingList<T>
IList<T>