Note that there is a ComboBox that is populated through its DataSource property. Each item in a ComboBox is a custom object, and a ComboBox is installed with DisplayMemberand ValueMember.
IList<CustomItem> aItems = new List<CustomItem>();
//CustomItem has Id and Value and is filled through its constructor
aItems.Add(1, "foo");
aItems.Add(2, "bar");
myComboBox.DataSource = aItems;
Now the problem is that I want to read the elements as a string that will be displayed in the user interface. Think that I do not know the type of each element in the ComboBox ( CustomItemunknown to me)
Is it possible?
Sudarsan srinivasan
source
share