Hi,
I am trying to use the Windows Forms Listbox controle in multi selection mode. When I try to read the selected values using the following code I get an array out of bounds error:
for(int i = 0; i < lst.SelectedIndices.Count; i++)
{
Debug.Writeline("value " + i + "=" + lst.SelectedIndices[i]);
}
The array out of bounds is given in the statement lst.SelectedIndices[i]. This is really strange as lst.SelectedIndices.Count does give the correct number of selected items.
Has anyone seen this behaviour before or know if it is a known bug?
Thanks in advance,
Nidkil