LINQ in Action roller

LINQ: how to group elements by position in the list

Hello, I'm new to LINQ and I am trying to write a query using following list of elements (the list can have any type of objects): Code Snippet List list = new List() { "Elem 1", "Elem 2", "Elem 3", "Elem 4", "Elem 5", "Elem 6", "Elem 7", "Elem 8", "Elem 9", "Elem 10", "Elem 11","Elem 12", "Elem 13" }; I want to group the elements, but each group has to have 4 elements (the last one, the rest of elements). Could anyone help me ? Read More...
Published Sunday, February 24, 2008 8:10 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication