First, start without syntax errors:
int[] array = new int[] { 3, 2, 1, 5, 4 };
Then you can use something like the LINQ OrderBy or OrderByDescending methods.
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
No.
Arranging them and printing them are two different things.
...but that code will not do what you expect.
You need something more like:
for (int i = 0; i < array.Length; i++)
{
Console.Write(array[i]);
}
for (int j = array.Length; j > 0; j--)
{
Console.Write(array[j-1]);
}
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
Use Console.WriteLine instead of Console.Write.
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
Use a label to show the original array, then use a multi-line text box to show the result when a button is pushed.
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402