diff --git a/docs/csharp/tutorials/working-with-linq.md b/docs/csharp/tutorials/working-with-linq.md index dbd7d53ee3400..9c97eab402296 100644 --- a/docs/csharp/tutorials/working-with-linq.md +++ b/docs/csharp/tutorials/working-with-linq.md @@ -101,7 +101,7 @@ The multiple `from` clauses produce a Ranks(rank => new { Suit = suit, Rank = rank })); +var startingDeck = Suits().SelectMany(suit => Ranks().Select(rank => new { Suit = suit, Rank = rank })); ``` The compiler translates LINQ statements written with query syntax into the equivalent method call syntax. Therefore, regardless of your syntax choice, the two versions of the query produce the same result. Choose which syntax works best for your situation: for instance, if you're working in a team where some of the members have difficulty with method syntax, try to prefer using query syntax. @@ -339,4 +339,4 @@ For more information on LINQ, see: - [Basic LINQ Query Operations (C#)](../programming-guide/concepts/linq/basic-linq-query-operations.md) - [Data Transformations With LINQ (C#)](../programming-guide/concepts/linq/data-transformations-with-linq.md) - [Query Syntax and Method Syntax in LINQ (C#)](../programming-guide/concepts/linq/query-syntax-and-method-syntax-in-linq.md) - - [C# Features That Support LINQ](../programming-guide/concepts/linq/features-that-support-linq.md) \ No newline at end of file + - [C# Features That Support LINQ](../programming-guide/concepts/linq/features-that-support-linq.md)