reverse collection
Published: 30. September 2011 | Updated: 30. September 2011License: Microsoft Public License (MS-PL)
Categories: Collections
Tags: C# Collections
Import namespace
using System.Linq;
Code
IEnumerable<int> collection = new int[] { 1, 2, 3, 4, 5 }; collection = collection.Reverse(); foreach (int i in collection) { Console.WriteLine(i); }
| Send us feedback about this snippet » |





