Saturday, September 8, 2018

Question about System.Linq (I had a job interview yesterday)

They told me to filter an object list by some condition, using Linq. So, I was using something like:

filteredList = list.Where(x=>x.Age > 18);

And the interviewer told me that I was not using Linq, that I should have used the other syntax, like:

filteredList = from x in list where x.Age > 18 select x;

Was he right?

Question about System.Linq (I had a job interview yesterday) Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team