fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. List<string> Items = new List<string>() { "One", "Two", "Three", "Four" };
  10.  
  11. foreach ( string item in Enumerable.Reverse(Items) )
  12. {
  13. Console.WriteLine(item);
  14. }
  15. }
  16. }
Success #stdin #stdout 0.03s 33952KB
stdin
Standard input is empty
stdout
Four
Three
Two
One