I thought it is easy but it's not
I have windows form with bound listbox (with value member and display member)
I enabled multiselect for the listbox
so I need to get all and only the selected values of the selected items (remember it's bound so i need the selected values not text or selected text)
so i can insert these values in some other tables
i tried this but it doesn't work
for (int x = 0; x <= listProjects.SelectedItems.Count; x++)
{
if(listProjects.GetSelected(x) == true)
{
string d = listProjects.SelectedValue.ToString();
string s = listProjects.SelectedItems[x].ToString();
//listProjects.DisplayMember[x].ToString();
//listProjects.Items[x].ToString();
}
}