I have PeopleList which is IEnumerable type.
When a Form loads, I use the following code to add each person to the listbox, myListBox.
foreach(var person in PeopleList)
Now all the people's names are populated in the listbox when a form is opened.
However, I used "person.Name" for user-friendly item names.
What I really need is "person.id", not "person.Name".
So when I click the button, I want to refer all the selected people's ids.
Can you please tell me how to get the list of selected people's ids?