"The type or namespace name 'Reverse' does not exist in the namespace 'Array' (are you missing an assembly reference?)"
If it considers Array as a namespace qualification, it means you did not import the System namespace.
Just place the line
using System;
at the top of your code file.
Or use a plain qualification:
System.Array.Reverse(myArray);
There is also a
Reverse
extension method defined in System.Linq namespace, but it acts differently: the former is a void method which acts directly on the array which is passed to it as a parameter, whereas the latter returns a
IEnumerable<TSource>
that you have to assign to your variable. This way:
using System.Linq;
int[] myArray = new int[] { 1, 2, 3 };
myArray = myArray.Reverse().ToArray();