i have a list like
var myList = new List<object> {
new { Day = "Sunday", ID = 15 },
new { Day = "Monday", ID = 20 },
new { Day = "Tuesday", ID = 80 }
};
now i would like to get the previous day of a given ID. e.g. 80 leads to Monday and Sunday should be the result for 20. The List is ordered by ID!
Ist there a easy way to determine the day-value? ideal would be a linq solution.