Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

listbox; number of selected items

Tags:

c#

asp.net

c#-4.0

While using listbox in c#, how can learn the count of selecteditems?

Listbox items: A,B,C,D. For example, I select C and D.

I want to make a loop in order to assign selecteditems.

How can I achieve it? How can I learn the number of selected item?

Thank you

like image 512
csharper Avatar asked Aug 23 '11 11:08

csharper


1 Answers

Maybe you are looking for this listbox1.GetSelectedIndices().Count();

like image 111
V4Vendetta Avatar answered Oct 15 '22 08:10

V4Vendetta