When performing a projection, the ________ operator can be used to flatten nested structures.

  • Flatten
  • SelectMany
  • Collapse
  • Merge
The correct option is "SelectMany". In LINQ, the SelectMany operator is used to flatten nested collections or structures. It allows you to project each element of a sequence to a collection and then flattens the resulting sequences into one sequence. This is particularly useful when dealing with nested structures such as collections within collections.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *