I have code below that builds a collection and returns it sorted by a property
var appChanges = GetHistory().ToList();
return appChanges.OrderByDescending(r => r.Change.When);
i want this to only return a max of 50 items (or total if collection size is less than 50)
how can i do this in LINQ ?
You’re looking for Take. See http://msdn.microsoft.com/en-us/library/bb503062.aspx