I want to populate a CheckedListBox based on the items passed into a form's constructor (in this case, a List<int
>).
My skeleton code for this is:
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);
}
Were you looking for checkedListBox1.Items.Add(userFriendlyPlatypusName);
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With