I am looking to sort in C#

Jun 15 2015 4:45 PM
I am looking to sort in C# and to be displayed in the GridView from a .txt file. This is what I have. Any assistange would be appreciated.
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ListOfRunners
{
class Runner
{
public string Name { get; set; }
public int Time { get; set; }
public int Age { get; set; }
public int Ranking { get; set; }
public void Print()
{
Console.WriteLine("{0} {1} {2}", Name, Time, Age);
}
public int CompareTo(Runner r)
{
return this.Time.CompareTo(r.Time);
}
}
}
 

Answers (2)