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?
0 comments:
Post a Comment