title: Convert datatype 'long' to byte array
body: <p>I have to convert values (double/float in C#) to bytes and need some help..<br>
  <br>
  // Datatype long  4byte -99999999,99 to 99999999,99<br>
  // Datatype long  4byte -99999999,9 to 99999999,9<br>
  // Datatype short 2byte -999,99 to 999,99<br>
  // Datatype short 2byte -999,9 to 999,9<br>
  <br>
  In my "world at home" i would just string it and ASCII.GetBytes(). <br>
  <br>
  But now, in this world, we have to make less possible space. <br>
  And indeed that '-99999999,99' takes 12 bytes instead of 4! if it's a 'long' datatype.</p>
  
  <p><strong>[EDIT]</strong><br>
  Due to some help and answer I attach some results here,</p>
  
  <pre><code>long lng = -9999999999L;
  byte[] test = Encoding.ASCII.GetBytes(lng.ToString());  // 11 byte
  byte[] test2 = BitConverter.GetBytes(lng);              // 8 byte
  byte[] mybyt = BitConverter.GetBytes(lng);              // 8 byte
  byte[] bA = BitConverter.GetBytes(lng);                 // 8 byte
  </code></pre>
  
  <p>There still have to be one detail left to find out. The lng-variabel got 8 byte even if it helds a lower values, i.e. 99951 (I won't include the ToString() sample). </p>
  
  <p>If the value are even "shorter", which means -999,99 -- 999,99 it will only take 2 byte space.
  <br>
  <strong>[END EDIT]</strong></p>