|
-
March 18th, 2012, 04:55 PM
#1
Need help with sorting in c#
Hi, Im using Visual Studio 2010 to create my project in.
So far I have read in a file and displayed this into a list box.
However I need to be able to display the information by Names ascending and another function that would display the information by highest mark first
The text file I am reading in looks like this where the name is at the start and the mark is at the end where they are separated by a space.
Normal file read in
==============
Andy Morris 5
Roberto Edgar 2
James Cox 4
April Hockley 10
Warren Day 9
ETC........
Sorted by name
==============
April Hockley 10
Andy Morris 5
James Cox 4
Roberto Edgar 2
Warren Day 9
Sorted by grade
============
April Hockley 10
Warren Day 9
Andy Morris 5
James Cox 4
Roberto Edgar 2
If it makes it easier I can change the way the text is written to the file.
Thanks in advance
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
|