【发布时间】:2018-12-21 13:37:26
【问题描述】:
我想使用 HashSet 作为列表框的数据源来填充它的内容:
HashSet<string> brCodes = new HashSet<string>();
listBoxBrcodes.DataSource = brCodes;
我在分配操作期间收到ArgumentException。
使用HashSet 作为listBox 的来源的最佳方式是什么?
【问题讨论】:
-
是winforms吗?不要忘记在问题中添加适当的标签
-
我正在使用 winforms。
-
@CodeCaster 哇! 800多个问题! ????
-
将其转换为列表...请参阅此问题stackoverflow.com/questions/1430987/hashset-conversion-to-list
-
@SergeyBerezovskiy 你为什么重新打开?