class Person {
int id;
string name;
string description
}
In the Array [] Persons i hold a collection of some Persons
In a Listbox i want to show the name
listbox.Items.AddRange(Persons);
now it's showing me "Persons" in the List, how can i select the Name for
the display?
I want my collection inside this listbox, so that i can use it for other
things. Handling events etc
thx
Herfried K. Wagner [MVP] - 03 Jan 2007 17:52 GMT
"scooge" <scooge@use.net> schrieb:
> class Person {
> int id;
[quoted text clipped - 10 lines]
> now it's showing me "Persons" in the List, how can i select the Name for
> the display?
Override 'ToString' in 'Person' and return the name.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>