Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 count the instances of string in an array and display them in acending order

$
0
0
I have an array like that

yankees
Yankees
mariners
white sox
yankees
yankees
Braves
mariner
braves
braves

I need to sorty the array using LINQ
They will be ordered by the number of times they are in the array.


and ouput the array into a listbox like so

yankees
braves
mariner
white sox


I have tried

dim repeatedquery = teams in teams()
group team acending


I am just trying to wrap my head around how to count the number of times a string appears in an array and query them in acending order

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>