vb.net - How do I arrange Items in a List-box? -
i working on vb windowsforms application. form has listbox contains numbers items. not arranged numeric sequence like..
01 09 02 07 ...
i want arrange them numeric sequence such as..
01 02 07 09 ...
i have not got idea doing so.
thank you
you can use method , call sort function...
private sub sortlistbox(byval listbox listbox) dim templist new list(of integer) each li in listbox.items templist.add(integer.parse(li.tostring())) next templist.sort() listbox.datasource = templist end sub
then call after have added items...
sortlistbox(listbox1)
Comments
Post a Comment