title: How to convert an int to a little endian byte array?
body: <p>I have this function in C# to convert a little endian byte array to an integer number:</p>
  
  <pre><code>int LE2INT(byte[] data)
  {
    return (data[3] &lt;&lt; 24) | (data[2] &lt;&lt; 16) | (data[1] &lt;&lt; 8) | data[0];
  }
  </code></pre>
  
  <p>Now I want to convert it back to little endian..
  Something like</p>
  
  <pre><code>byte[] INT2LE(int data)
  {
    // ...
  }
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>Thanks.</p>