title: Convert float to byte array in C# NETMF (NETMF doesn't have BitConverter)
body: <p>I have a C# <a href="http://en.wikipedia.org/wiki/.NET_Micro_Framework" rel="nofollow">NETMF</a> project, and I need to convert a <code>float</code> to a <code>byte[]</code> and vice versa. The problem is, NETMF doesn't have <code>System.BitConverter</code> like .NET, so I can't really find any way of doing it without going low level and doing it myself.</p>
  
  <p>I have always programmed high-level (<a href="http://en.wikipedia.org/wiki/Java_%28programming_language%29" rel="nofollow">Java</a>, <a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29" rel="nofollow">Python</a>, <a href="http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29" rel="nofollow">C#</a>, etc.) and have only dabbled in C++, so I don't really know how to turn a float into a byte array.</p>
  
  <p>What would some sample code of a boilerplate function for doing this look like?</p>