From 39990df1f3a5b201337f4e511f3f036500509f8e Mon Sep 17 00:00:00 2001 From: Willy David Jr Date: Sat, 6 Jul 2019 02:54:44 +0800 Subject: [PATCH] Corrected Code on Counting how many fruits are red (#32722) Corrected the expression that was used on Where clause. --- guide/english/csharp/linq/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/english/csharp/linq/index.md b/guide/english/csharp/linq/index.md index b665d059cb..3f207c697f 100644 --- a/guide/english/csharp/linq/index.md +++ b/guide/english/csharp/linq/index.md @@ -29,7 +29,7 @@ Then we can do things like: var firstName = fruits.Select(f => f.Name).First(); // Orange // Count how many fruits are red -var qntRed = fruits.Where(Color == "Red").Count(); // 2 +var qntRed = fruits.Where(f => f.Color == "Red").Count(); // 2 // Create a list of yellow fruits var yellowFruits = fruits.Where(f => f.Color == "Yellow").ToList(); // { Pineapple, Mango }