Today I was trying to figure out the Linq syntax to find the max DateTime out of a list of objects that had a ModifiedOn property. Here is what I came up with:
DateTime maxLastModified = list.PickListItems.Items.Max(p => p.ModifiedOn);
Too easy, huh?
Actually, this is not so much Linq as just extension methods and lambda expressions, although one could argue that is what Linq is...I will leave that to the philosphers.
Copyright © 2003-2010 Falafel Software Inc.
The opinions expressed herein are Falafel's employees own personal opinions and do not represent Falafel Software's view in any way in case they go bananas!