Replacing foreach loop with LINQ






4.38/5 (5 votes)
Isn't it possible to remove the from and select statements by using a lambda expression?var bestStudents=students.Where(s=>s.Grade>9);
Isn't it possible to remove the
from
and select
statements by using a lambda expression?
var bestStudents=students.Where(s=>s.Grade>9);