Switch to full style
Codes, tips and tricks,discussions and solutions related to C#
Post a reply

I need help with this C# exercise

Tue Jun 16, 2009 5:06 pm

I have a list of swimmers with their finish times and ages shown in the table below.
How do I write a C# code to display the swimmers sorted by finish time with a column showing
their finish position (ranking) within their age group.

The age groups are
11 - 20 years
21 - 30 years
30+ years

Name Time Age
--------------------
Bob 10 21
Dave 16 16
Jon 20 26
Doug 17 29
Mike 15 31
Jerry 8 18
Dan 25 36
Ed 13 20
Stan 30 36

I can do a sorting based on finish time but how can I sort these objects based on age as well? Thanks for your suggestions.



Post a reply