boycoto

boycoto

  • NA
  • 147
  • 125.9k

Convert to Lambda expression

Aug 8 2012 9:49 PM
I am a newbie in lambda expression, can anyone help me on converting the line of codes into lambda expression. Please...it makes me pissed off.

var query =
 from c in
 (from line in File.ReadAllLines(filePath)
 let customerRecord = line.Split(',')
 select new Customer()
 {
 Firstname = customerRecord[0],
 Lastname = customerRecord[1],
 JobTitle = customerRecord[2],
 City = customerRecord[3],
 Country = customerRecord[4]
 })


Answers (10)