-
Mar 1st, 2018, 02:46 PM
#1
Thread Starter
New Member
Invert Listbox Items
Hello people,
I have a listbox and I want to invert the items in it (reverse them, the first goes last and the last goes first).
Any short ways to do it?
-
Mar 1st, 2018, 03:13 PM
#2
Re: Invert Listbox Items
Voila:
Code:
Dim reversed As IEnumerable(Of String) = ListBox1.Items.Cast(Of String).Reverse
ListBox1.DataSource = reversed.ToArray
-
Mar 1st, 2018, 03:48 PM
#3
Thread Starter
New Member
Re: Invert Listbox Items
Originally Posted by dday9
Voila:
Code:
Dim reversed As IEnumerable(Of String) = ListBox1.Items.Cast(Of String).Reverse
ListBox1.DataSource = reversed.ToArray
Awesome, thanks!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|