title: Compare 2 byte arrays
body: <p>I have 2 int arrays.</p>
  
  <pre><code>int[] data1 #
  int[] data2 #
  </code></pre>
  
  <p>I want to create a 3rd int[] data3 which is the differences between the 2 other arrays.</p>
  
  <p>Let us take the 1st value in data1.</p>
  
  <p>The value is 15 (e.g.).</p>
  
  <p>Now let us take the 1st value in data2.</p>
  
  <p>The value is 3 (e.g.).</p>
  
  <p>The 1st value in data3 would be 12.</p>
  
  <p>BUT, if the 1st values were the other way round i.e.</p>
  
  <pre><code>data1[0]  = 3
  data2[0]  = 15
  </code></pre>
  
  <p>then the difference would be -12. Yet I want it to be just 12.</p>
  
  <p>at the moment I have a for loop and I do the computation stuff there to get that type of result.</p>
  
  <ol>
  <li>Is there a way to do data1-data2 = data3 without enumerating through
  a loop? </li>
  <li>If so, can I just get the differences without using minus
      numbers?</li>
  </ol>
  
  <p>Thanks</p>
  
  <p>N.B.
  In response to the 'closers'. I agree with you to a certain point. What I need to add to this questions is this:</p>
  
  <p>I am looking for the most efficient (quickest way but low memory being 2nd priority) to facilitate this. Using Linq (as I understand it) can be the slowest approach?</p>