how do you add a condition to a lambda expression
- by ooo
if i have this code today to find out a sum total using LINQ:
return (MyArray.Sum(r => r.Trips);
and i want to only include itms where r.CanDrive == true.
can you add a condition into a single linke lambda expression? how would you do this