I setup an array and i would like to create a method that will return an array with the elements in reverse. e.g. if there are 10 slots then array1[9] = 6 so
public class MyList : IEnumerable
{
private T[] arr;
public int Count
{
get { return arr.Length; }
}
public void Reverse()
{
T[] newArr = arr;
arr = new T[Count];
int number = Count - 1;
for (int i = 0; i < Count; i++)
{
arr[i] = newArr[number];
number--;
}
}
}