CSharpFeeds - All your C# feeds in one place.

Tuesday, October 19, 2010

LINQ: Implementing The SkipLast Operator

by Paulo Morgado via Paulo Morgado : C# on 10/19/2010 11:59:00 PM

Following my last post, in this post I’ll introduce the implementation of the SkipLast operator. The SkipLast operator returns all but a specified number of contiguous elements from the end of a sequence and is implemented as the SkipLast extension method: public static IEnumerable<TSource> SkipLast<TSource>(this IEnumerable<TSource> source, int count) To implement this operator, first we start by buffering, at most, a count number of items from the source sequence in an a ...

[ read more ]

LINQ: Introducing The Skip Last Operators

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 ]

ASP.NET MVC 3: New @model keyword in Razor

by Scott Guthrie via ASPAlliance.com - Articles, reviews, and samples for .NET Developers on 10/19/2010 12:00:00 AM

This article examines the usage of the new @model directive which is now included with the ASP.NET MVC 3 Razor view engine in detail with the help of relevant screenshots. Scott also explains model referencing with both ASP.NET MVC 3 Preview and Beta with special reference to @model syntax. ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us