我想根据传入表单构造函数的项目填充CheckedListBox(在这种情况下,列表<int
>)。如何动态填充CheckedListBox?
因为我这个框架代码是:
foreach (int platypus in listPlatypi)
{
userFriendlyPlatypusName = ExpandFromPlatypusID(platypus);
// I want to store a verbose string in an Item of the CheckedListBox, something like:
// Item item = new Item(userFriendlyPlatypusName); // what data type should "Item" be?
CheckedListBox1.Add(item);
}
啊,孩子 - 为什么昨天是不是明显,我现在是令人难以置信的尴尬。 – 2012-07-19 17:40:38
不要尴尬:我在5分钟前做出了同样的决定。谢谢@keyr的答案和你的问题。 – 2016-05-02 11:40:47