LINQ: How to skip one then take the rest of a sequence
Posted
by Marcel
on Stack Overflow
See other posts from Stack Overflow
or by Marcel
Published on 2010-03-12T09:47:40Z
Indexed on
2010/03/12
9:57 UTC
Read the original article
Hit count: 223
Hi All,
i would like to iterate over the items of a List<T>
, except the first, preserving the order. Is there an elegant way to do it with LINQ using a statement like:
foreach (var item in list.Skip(1).TakeTheRest()) {....
I played around with TakeWhile
, but was not successful. Probably there is also another, simple way of doing it?
© Stack Overflow or respective owner