BlackWaspTM

This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | 4 | 5 | Next >> |
Taking Every Nth Item from a SequenceTaking Every Nth Item from a Sequence
The standard query operators include methods to extract items from the start of a sequence or to skip several items. This article describes a custom operator with a similar syntax that creates a sequence from every nth item in a source collection.
A LINQ Style Duplicate Item FinderA LINQ Style Duplicate Item Finder
Language-Integrated Query (LINQ) includes a number of set operators, including one that removes duplicates from a sequence to return only distinct values. This article describes a custom set operator that returns only the duplicated values from a list.
Generating Running Totals with LINQGenerating Running Totals with LINQ
A common task when working with sequences of numbers, or collections of objects that include a numeric property, is to generate a running total for those items. This can be achieved using Language-Integrated Query (LINQ) and a closure.
A LINQ Operator to Select Multiple Values from SequencesA LINQ Operator to Select Multiple Values from Sequences
Language-Integrated Query (LINQ) includes several projection operators but none that allow multiple items to be created from each item in a sequence. This article describes a custom operator that allows several selections to be made per item.
Creating A Generic Lambda-Based IComparer&lt;T&gt;Creating A Generic Lambda-Based IComparer<T>
Several standard .NET framework classes perform comparisons of values or objects and allow those comparisons to be controlled using an IComparer<T> implementation. This article describes a generic comparer that obtains results using lambda expressions.
A LINQ Style Range GeneratorA LINQ Style Range Generator
Language-Integrated Query (LINQ) provides the Enumerable.Range method that generates incrementing sequences of integers. This article describes a similar method that allows the creation of more complex ranges with the repeated application of a function.
A Generic Equality Comparer for LINQA Generic Equality Comparer for LINQ
LINQ operators generally use lambda expressions to control their processing and output. Some operators use IEqualityComparer<T> implementations to compare values. This article describes a generic comparer, driven by delegates, designed for use in queries.
LINQ Outer JoinsLINQ Outer Joins
One commonly used feature of Language-Integrated Query (LINQ) is the facility to combine two sequences of related data using joins. The standard join operation provides an inner join but with a minor modification can be changed to give a left outer join.
LINQ Partitioning with IndexesLINQ Partitioning with Indexes
The LINQ partitioning operators allow the first elements of a sequence to be extracted, or skipped so that all other elements are returned. When using TakeWhile and SkipWhile, the index of each item can be included in the predicate.
Projecting Indexes with LINQProjecting Indexes with LINQ
All sequences have a notional order that can be expressed using index values in a similar manner to the indexes of an array. When projecting sequences using LINQ's Select and SelectMany operators, this index value can be included in the projection.
<< Previous | 1 | 2 | 3 | 4 | 5 | Next >> |