Convert string "0x32" into a single byte
<p>I'm working with C# trying to convert a string value into a byte. Seems to be harder then I expected. Basically I have a string called hex = "0x32" and need byte block to equal this value.</p>

<pre><code>string hex = "0x32";
byte block = Convert.ToByte(hex);
</code></pre>

<p>The above doesn't work, does anybody know how I can successfully assign the hex value to the byte. I need to append this byte to a byte array later in the code.</p>
