Convert a 4 char string into int32
<p>Is there a fast way to convert 4 chars into a 32bit int?  I know i can loop through it like :</p>

<pre><code>string key = "ABCD";
int val = 0;
for (int i = 0; i &lt; 4; i++)
{
    int b = (int)key[i] * (int)Math.Pow(256, i);
    val += b;
}
// val = 1145258561
</code></pre>

<p>I would like something lower level, I know the chars are stored as bytes.  I don't mind if its unsafe code because I am basically trying to write a 4 char string to an integer pointer location.</p>
