title: Good way to convert between short and bytes?
body: <p>I need to take pairs of bytes in, and output shorts, and take shorts in and output pairs of bytes. Here are the functions i've devised for such a purpose:</p>
  
  <pre><code>static short ToShort(short byte1, short byte2)
  {
      short number = (short)byte2;
      number &lt;&lt;= 4;
      number += (short)byte1;
      return number;
  }
  static void FromShort(short number, out byte byte1, out byte byte2)
  {
      byte byte2 = (byte)(number &gt;&gt; 4);
      short tempByte = (short)byte2 &lt;&lt; 4;
      byte byte1 = (byte)(number - tempByte);
  }
  </code></pre>
  
  <p>I think this is correct but i'm not sure. If this isn't the right way to do it, what is? is there a way to do this already in the framework?</p>