LINQ Generation Operations

  Total Views : 811
  Comments : 0
  Keywords : Linq generation operators in c#, with example, Linq generation operators range / repeat / empty in c# / with example, Generation operators in c# / with example

Here we will learn LINQ generation operators / operations in c#, with example and different type of generation operators (defaultifempty, range, repeat, empty) in LINQ with examples.

LINQ Generation Operations

In LINQ generation operations are used to create new sequence of elements. In LINQ we have different type of generation operator methods available those are


  • DefaultIfEmpty
  • Range
  • Repeat
  • Empty

These LINQ generation operators will help us to generate new sequence of elements.


Following table shows more detailed information related to generation operator methods.


DefaultIfEmpty In case if collection contains empty elements then it will return default value
Empty It returns empty collection sequence
Range It returns a collection that contains a sequence of numbers.
Repeat It returns a collection that contains one repeated value based on specified length.

In next chapters we will study these LINQ generation operations in detail with example.


 Comments (0)

Be the first to give your valuable feedback

Leave a comment

  • Default Tutlane User