Using LINQ:
var sortedList = _allStatInfo.OrderBy(si => si.date).ToList();
Sorting the original list:
_allStatInfo.Sort(new Comparison<StatInfo>((x, y) => DateTime.Compare(x.date, y.date)));
Using LINQ:
var sortedList = _allStatInfo.OrderBy(si => si.date).ToList();
Sorting the original list:
_allStatInfo.Sort(new Comparison<StatInfo>((x, y) => DateTime.Compare(x.date, y.date)));