Quantcast
Channel: sorting a list
Viewing all articles
Browse latest Browse all 2

sorting a list

0
0
Please advise best way to sort a list based on numeric value of a list struct element:-

For example...

private structure myparams
dim level as integer
dim other
end structure

.
.
.
level_list as new list(of myparams)

.
.
dim mydata as myparams

mydata.level=5
level_list.add(mydata)
mydata.level=9
level_list.add(mydata)
mydata.level=2
level_list.add(mydata)


'how do I get a list sorted by myparams.level?

additionally, do I have to resort every time I add an entry or can I add in a way that it add's by .level?


VB2005 starter

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images