Which LINQ operator is used to perform set operations like union, intersection, and difference on sequences?

  • Concat
  • GroupBy
  • Join
  • Select
The Concat operator in LINQ is used to combine two sequences into a single sequence. It performs set operations such as union, intersection, and difference on the sequences. It takes two sequences as input and returns a new sequence containing all the elements from both input sequences, excluding duplicates. This operator is useful for combining data from multiple sources or performing set-based operations on collections.
Add your answer
Loading...

Leave a comment

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