An Example Calling the Reverse Operator

image_pdfimage_print
   
 

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);
    }
}

    


This entry was posted in LINQ. Bookmark the permalink.