reverse array
Published: 30. September 2011 | Updated: 26. October 2011License: Microsoft Public License (MS-PL)
Categories: Framework » Arrays
Tags: Array C#
int[] array = new int[] { 1, 2, 3, 4, 5 }; Array.Reverse(array); foreach (int i in array) { Console.WriteLine(i); }Console Output:
5
4
3
2
1
4
3
2
1
| Send us feedback about this snippet » |





