Javatpoint Logo
Javatpoint Logo

LINQ Set Operations

In LINQ, Set Operators are used to return the set of the result based on the presence or absence of equivalent elements within the same or separate collections.

In LINQ, we have different types of set operators available. These are:

  1. UNION
  2. INTERSECT
  3. DISTINCT
  4. EXCEPT
LINQ Set Operations

All these set operators will perform as the different operators like removing duplicate elements from the collections or combine all the elements of the collections or leave some elements from the collection based on our requirement.

The following table shows more details related to set operators in LINQ.

Operators Description
UNION Union operator combines multiple collections into single collection and return the resultant collection with unique element.
INTERSECT It returns the element in a sequence, which is common in both the input sequence.
DISTINCT It removes the duplicate elements from the collection and returns the collection with unique values.
EXCEPT It returns the sequence element from the first input sequence, which is not present in the second input sequence.

Next TopicLINQ Union Method




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA