Range Filtering : Range « LINQ « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

    class MainClass
    {
        static void Main()
        {
            var collection = Enumerable.Range(0, 10)
                           .Where(x => x % 2 != 0)
                           .Reverse();

            foreach (var element in collection)
            {
                Console.WriteLine(element);
            }
        }
    }








22.59.Range
22.59.1.Range Cartesian Join
22.59.2.Range Enumeration
22.59.3.Range Filtering
22.59.4.Range Ordering
22.59.5.Range Projection
22.59.6.Range Reversal