You can add any object to a listbox, even classes. For example:
class Product
{
private int ProductID;
private string ProductName;
public Product(int productid, string productname)
{
this.ProductID = productid;
this.ProductName = productname;
}
}
Product myProduct = new Product(5343, "Car");
ListBox.Items.Add(myProduct);
Product selectedProduct = ListBox.SelectedItem() as Product;
hope you find it useful
"Jeff Williams" <je***********@hardsoft.com.auschreef in bericht
news:12*************@corp.supernews.com...
How di I dynamically build and 2 dimensional array and assign this array
to a combobox. 1 item will be the displayed details and the other is the
value I need returned.