title: How to get little endian data from big endian in c# using bitConverter.ToInt32 method?
body: <p>I am making application in C# which has a byte array containing hex values.</p>
  
  <p>I am getting data as a big-endian but I want it as a little-endian and I am using <code>Bitconverter.toInt32</code> method for converting that value to integer.</p>
  
  <p>My problem is that before converting the value, I have to copy that 4 byte data into temporary array from source byte array and then reverse that temporary byte array.</p>
  
  <p>I can't reverse source array because it also contains other data.</p>
  
  <p>Because of that my application becomes slow.</p>
  
  <p>In the code I have one source array of byte as <code>waveData[]</code> which contains a lot of data.</p>
  
  <pre><code>byte[] tempForTimestamp=new byte[4];
  tempForTimestamp[0] = waveData[290];
  tempForTimestamp[1] = waveData[289];
  tempForTimestamp[2] = waveData[288];
  tempForTimestamp[3] = waveData[287];
  int number = BitConverter.ToInt32(tempForTimestamp, 0);
  </code></pre>
  
  <p>Is there any other method for that conversion?</p>