Generation Operator in LINQ

Generation operators are the operators in LINQ which are use to produce an range and repetition of result. These are two types Range Operator and Repeat Operator. In this article we discuss about these two categories of the Generation Operators.
  • First we discuss about the Range operator by using a simple example. you can write this code in and by getting the output you understand the working of Range operator.

        EXAMPLE CODE          

           Module Module1
                Sub Main()
                    Dim Values = From n In Enumerable.Range(1, 20) Select No = n, OddEven = If(n Mod 2 = 1, "odd", "even")
                    For Each n In Values
                        Console.WriteLine("The number {0} is {1}.", n.No, n.OddEven)
                End Sub

Read Full Article Here

Next Recommended Reading Quantifiers Operators in LINQ