65.9K
CodeProject is changing. Read more.
Home

Replacing foreach loop with LINQ

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.38/5 (5 votes)

Oct 22, 2011

CPOL
viewsIcon

15281

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);