public void sort()
{
datelist = new List<DateTime>(rdate); //timedates
intlist = new List <Int>(rint); //integers
datelist.Sort((a, b) => a.CompareTo(b)); //sorts the dates ascending(I think)
}
I have two initial arrays; these match by index number. I have converted these to lists in order to sort them. How would I sort intlist in exactly the same way as the datelist? Thanks.
Assuming you have linq at your disposal (.net 3.5 +) you can do the following.