I have two List which I am accessing by index (e.g. Name[10], Date[10]). They\'re closely tied, so Name[10] is related to Date[1
Do yourself a favor and keep the two things together:
public class NameAndDate {
public string Name { get; set; }
public DateTime Date { get; set; }
}
Then you keep them in one list (List):
If you want to sort by the name, add a IComparer implementation to NameAndDate, then you can just call Sort() on the list.
If you want to keep access to the Name and the Date, add accessor methods to Results, like
public string GetName(int index) {
return list[i].Name;
}