I need to sort a List<> of MediaItem objects by publish date...the publish date is not a property of the item. So my initial intention was to temporarily tack on a publi
One way would be to use the ListComparison
delegate.
// Sorts tuples in chronological order. To use reverse chronological order,
// use t2.Item2.CompareTo(t1.Item2) instead.
list.Sort((t1, t2) => t1.Item2.CompareTo(t2.Item2));
This of course assumes that there are no null-references in the list, which there can't be in your example.