Converting a byte swapping/shifting code snippet from C++ to .NET
<p>I have a short code snippet in C++ and I need to have the same functionality in C#:</p>

<pre><code>typedef enum {eD=0x0, eV=0x1, eVO=0x2, eVC=0x3} eIM;
#define htonl(x)  ( ( ( ( x ) &amp; 0x000000ff ) &lt;&lt; 24 ) | \
                    ( ( ( x ) &amp; 0x0000ff00 ) &lt;&lt; 8  ) | \
                    ( ( ( x ) &amp; 0x00ff0000 ) &gt;&gt; 8  ) | \
                    ( ( ( x ) &amp; 0xff000000 ) &gt;&gt; 24 ) )

int value = htonl(eV);
</code></pre>

<p>Unfortunately I'm no big programmer, so I need some help. </p>
