KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a list of objects and each object has a ExpirationDate property which is of type DateTime . I want to retrieve the latest date in the list. Is there an elegant way of doing that through LINQ? Something like: DateTime latestDate = myCollection.Where(r=>r.ExpirationDate.HasValue).MaxDate(r=>r.ExpirationDate.Value);
Tags (comma-separated)
Save Edits
Cancel