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)));
More Related Contents:
- Merge two arrays and return sorted array in c# [closed]
- C# List sorting with multiple range
- How do you sort a dictionary by value?
- Preserving order with LINQ
- Sort a list from another list IDs
- Best way to randomize an array with .NET
- Sorting rows in a data table
- List OrderBy Alphabetical Order
- Sort ObservableCollection through C#
- How do I sort a two-dimensional (rectangular) array in C#?
- How do I sort an observable collection?
- Getting Serial Port Information
- Using IComparer for sorting
- String sorting issue in C#
- Sorting an array of folder names like Windows Explorer (Numerically and Alphabetically) – VB.NET
- How to sort depended objects by dependency
- How to sort TreeView items using SortDescriptions in Xaml?
- Sort a Custom Class List
- LINQ order by null column where order is ascending and nulls should be last
- DataGridView Using SortableBindingList
- How would I sort a list of files by name to match how Windows Explorer displays them?
- How to sort two arrays by same index?
- How to sort a list / array of string version number?
- Sort one list by another
- Is there a sorted collection type in .NET?
- BindingList.Sort() to behave like a List.Sort()
- Why does the default string comparer fail to maintain transitive consistency?
- C#: Custom sort of DataGridView
- Better way to sort array in descending order
- Sort dataGridView columns in C# ? (Windows Form)