title: How to create byte array with your own bytes?
body: <p>I have to create my own byte array e.g:</p>
  
  <pre><code>byte[] connect = new byte[] { 0x00, 0x21, 0x60, 0x1F, 0xA1, 0x07 };
  </code></pre>
  
  <p>This byte array works fine, but I need to change some hex code. I tried to do a lot of changes but
  no one work.</p>
  
  <pre><code>Int32 hex = 0xA1; 
  
  byte[] connect = new byte[] { 0x00, 0x21, 0x60, 0x1F, 0xA1, hex};
  
  
  string hex = "0xA1"; 
  
  byte[] connect = new byte[] { 0x00, 0x21, 0x60, 0x1F, 0xA1, hex};
  
  
  byte[] array = new byte[1];
  array[0] = 0xA1;
  
  byte[] connect = new byte[] { 0x00, 0x21, 0x60, 0x1F, 0xA1, array[0]};
  </code></pre>
  
  <p>I don't know what type of variable I must have to use to replace automatic the array values.</p>