ordering a sequential text file/listboxes

daniella

Member
Joined
Apr 13, 2009
Messages
6
Location
england
Programming Experience
Beginner
sorry to make another post so soon but say i have a list of scores etc in this list box:

picture6qxt.png


and this is done by this code:

'when page loads the sequential file will be loaded into the listbox
Dim THEYFILE As String = "C:\Documents and Settings\Administrator\My Documents\PROJECTFILES\THEYSTUDENTSCORES.TXT"
Using sr As New IO.StreamReader(THEYFILE)
While sr.Peek <> -1
Me.listbox1.Items.Add(sr.ReadLine)
End While
End Using

does any one know how to:
i) list them from highest to lowest results
i) 'cut off' the top 5 results to output?

thankyou very much for any help! xox
 
Back
Top