I have a listbox that contains numbers that vary from 0 to 99. My problem is when the number in the listbox is 0, listbox1.selectedindex will not return a value. So I cannot use removeat(x) which works for all other numbers. Can anyone give me an idea on how to do it ?
Thanks your code helped me getting the indexnumber. I use the indexnumber as an integer named si. I have the code ListBox1.Selected.Item.RemoveAt(si) under a button which will remove any number from the listbox except the number 0 even with the right indexnumber. I don't understand why