Hi,
Im trying to use a listBox to search some objects, it then adds the object to the listbox if it meets the condition. So far i have this.
foreach (Order ord in Form1.cutomerArray)
{
Order searchCust = (Order)Form1.cutomerArray[i];
if (searchCust.FirstName.ToLower() == txtFirstName.Text.ToLower())//if match is found
{
lstbSearch.Items.Add(searchCust);//add object to search box
}
}
This works fine but it just shows the form name and class name.
Is it possible to still add the object to the listBox but change what is shown.
I need to add the object as later i get the cutomer number from that object.
Thanks