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
List> list = new List>();
for (int i = 0; i <= 10; i++)
{
DateTime date = new DateTime(2011, i, 1);
MediaItem item = new MediaItem();
list.Add(new Tuple(item, date));
}
list.Sort((a, b) => a.Item2.CompareTo(b.Item2));
foreach (var element in list)
{
Console.WriteLine(element);
}