How do I get 2 similar arrays without one affecting the other
<p>I am trying to do 2 different sorting algorithms on 2 exactly similar arrays (numbers and numbers2) that are generated through the Random class. I declare my 2 arrays and fill them with Random.NextBytes.</p>

<p>After that I do my first algorithm on <em>numbers</em> and then my second sorts on <em>numbers2</em>.</p>

<p>But I notice that <em>numbers2</em> just seems to be a pointer to <em>numbers</em> because by the time I want to sort numbers2 it is already sorted.</p>

<p>How do I fill numbers2 with exactly the same numbers as numbers? Do I need to do it by hand with a <em>for</em> loop? Thank you!</p>

<pre><code>class FillArray
   {

    public byte[] numbers;
    public byte[] numbers2;

        //instantiate MS Random object
        Random Generator = new Random();


        //Constructor which takes array size
        public FillArray(int amountx)
        {
          numbers = new byte[amountx]
          Generator.NextBytes(numbers);
          numbers2 = new byte[amountx];
          numbers2 = numbers;
          amount = amountx;
        }
</code></pre>
