An Example Calling the Reverse Operator : Reverse « LINQ « C# / C Sharp






An Example Calling the Reverse Operator

 

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
    public static void Main() {
        string[] presidents = {"lore", "Truman", "Tailer", "Van", "Washington", "Wilson"};

        IEnumerable<string> items = presidents.Reverse();

        foreach (string item in items)
            Console.WriteLine(item);
    }
}

 








Related examples in the same category

1.Reverse does exactly as it says