Reputation: 16003
What's the LINQ syntax to take all rows except the first one? Does LINQ offer a nice concise way to do it?
Upvotes: 8
Views: 4142
Reputation: 52788
You can use the Skip(TSource) extension method on any IEnumerable.
var allButFirst = rows.Skip(1);
Upvotes: 4
Reputation: 56381
var allButTheFirst = collection.Skip(1);
More info:
http://msdn.microsoft.com/en-us/library/bb358985.aspx
Upvotes: 20