|
by Paulo Morgado via Paulo Morgado : C# on 10/19/2010 11:58:00 PM
After having introduced the TakeLast operators (>)(>)(>), it makes sense to introduce their duals: the SkipLast operators. Name Description Example SkipLast<TSource>(IEnumerable<TSource>) Returns all but a specified number of contiguous elements from the end of a sequence. int[] grades = { 59, 82, 70, 56, 92, 98, 85 };
var lowerGrades = grades
.OrderBy(g => g)
... [ read more ]
|
|