need help on sorting a list of objects
List<myclass> mylist= new List<myclass>();
now I have this right now so it sorts on the times and that works fine and great.
[0,0,0,1,0,1,0,1,2,2,1,2]= times
[1,2,3,4,5,6,7,8,9,10,11]=index
[0,0,0,0,0,1,1,1,1,2,2,2]= sorted times
[1,2,3,5,7,4,6,8,10,9,10,11]= indexes when time is sorted
My problem is I need those indexes to be sorted also so say any myclass with time of 0 is then sorted in order of index smallest to greatest.
Ive been looking at sorting tutorials for along time but I cant get any of them to work. Can anyone help me?
[code]
public class myclass : Icomparable
{
int time, int index;
public Int32 CompareTo(object o)
{
myclass t = (myclass)o;
return (this.time.CompareTo(t.time));
}
}
[/code]

