nerdexam
Microsoft

70-516 · Question #159

The application must provide a component part list for any product. The component part list must give the quantity of each distinct part that is required to manufacture that product. You need to…

The correct answer is B. IEnumerable<Tuple<int, Part>> result = part.Descendants. See the full explanation below for the reasoning.

Question

The application must provide a component part list for any product. The component part list must give the quantity of each distinct part that is required to manufacture that product. You need to create a LINQ expression that delivers a a result of type IEnumerable<Tuple<int,Part>> to meet the requirements. Which expression should you use?

Options

  • AIEnumerable<Tuple<int, Part>> result = part.Children
  • BIEnumerable<Tuple<int, Part>> result = part.Descendants
  • CIEnumerable<Tuple<int, Part>> result = part.Descendants
  • DIEnumerable<Tuple<int, Part>> result = part.Children
  • EIEnumerable<Tuple<int, Part>> result = part.Descendants

How the community answered

(31 responses)
  • A
    13% (4)
  • B
    74% (23)
  • C
    3% (1)
  • D
    6% (2)
  • E
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice