Skip to main content

Timeline for Iterate through ComponentModel List

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
Mar 21, 2013 at 18:34 comment added Ant P As I recall it was a simple List has no method Take on doing a list.Take(int n) after @using System.Linq. Doing Enumerable.Take(list, n) instead resolved the issue.
Mar 21, 2013 at 14:03 comment added Alex Klock Hi, do you remember the error or issue you were having? We currently do something very similar to what the OP is trying to do on my current project (sorting a bunch of articles on a page), as well as pretty extensive use of other LINQ statements. The code in my code last block is almost identical to what we are using on one of our templates.
Mar 21, 2013 at 13:40 comment added Ant P I'm not sure that this will work - I have had trouble in the past using extension methods from System.Linq in Razor templates, without using them as a static method of Enumerable as detailed in my answer.
Mar 21, 2013 at 13:27 history answered Alex Klock CC BY-SA 3.0