我想根據傳入表單構造函數的項目填充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