nerdexam
Microsoft

70-516 · Question #146

70-516 Question #146: Real Exam Question with Answer & Explanation

The correct answer is C. Use the ToList() query extension method.. See the full explanation below for the reasoning.

Question

You have executed the Where query extension method on your collection, and it returned IEnumerable of Car, but you want to assign this to a variable whose type is List Of Car. How can you convert the IEnumerable of Car to List Of Car?

Options

  • AUse CType (C# cast).
  • BIt can't be done.
  • CUse the ToList() query extension method.
  • DJust make the assignment

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice