Skip to content

Latest commit

 

History

History
 
 

csharp

101 C# LINQ Samples

Learn how to use LINQ in your applications with these code samples, covering the entire range of LINQ functionality and demonstrating LINQ to objects, and LINQ to XML.

aggregate

Learn how to generate a single value from a sequence

concatenation

Combine multiple sequences into a single source sequence.

conversion

Convert sequences of one type into another.

customsequence

Learn how to build seqeunces from multiple inputs.

element

Use the index of items in a sequence during a query.

equality

Compare sequences for equality.

generation

Generate sequences by running a query.

grouping

Group items into sub-sequences.

join

Combine multiple sequences into a single sequence by matching values on properties.

ordering

Sort sequences.

projection

Transform sequences into new types.

quantifer

Test for all or any elements matching a condition.

queryexecution

Learn about deferred and immediate query execution.

restriction

Filter sequences using Where.

setoperators

Learn about set operations such as Distinct, Except, Intersect, and Union.

Build and Run

. To build and run the sample, type the following two commands in any of the subdirectories:

dotnet restore dotnet run

dotnet restore restores the dependencies for this sample. dotnet run builds the sample and runs the output assembly.

[!INCLUDEDotNet Restore Note]