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.
有办法检查列表框是否连接到数据源?
我的意思是这样的
if (listbox1.datascource.enabled == true) ....
是的,只是测试
if (listbox1.DataSource != null)
这可以很容易地通过查看与 NET 相关的所有内容的参考资料来发现
Listbox.DataSource 上的 MSDN