Assigning the whole array values to another variable in c#?
<p>I have an array and i want to assign it to another array variable. Here is the code</p>

<pre><code>for (int i = 0; i &lt; length; i++)
        {
            arr1[i] = Convert.ToByte(Tag_uid.Substring(2 * i, 2), 16);
        }



        //Create an array to hold the Command Packet
        byte[] CommandPacket = new byte[9];


        CommandPacket[0] = arr1;   //ERROR: cannot convert type byte[] to byte
</code></pre>

<p>How can i assign the whole array values to <code>commandpacket[0]</code>?</p>
