I have a class like this
public class HistoryEntry
{
DateTime Date{ get; protected set; }
HistoryType EntryType { get; protected set; }
}
public enum HistoryType
{
Cancelled,
Cleared,
Redeemed,
Refunded
}
I have an unordered list of these History Entries, and I do Exists statements to see if an entry exists in the list.
return Entries.Exists(e => e.EntryType == HistoryEntryType.Cancelled);
Now I need to change this so that this method returns whether or not a Cancelled entry exists after the TimeStamp of the last Cleared entry if one exists, otherwise just return whether a Cancelled entry exists at all.
I'm limited to options available in .Net 2.0