BuiltIn Function to Convert from Hex String to Byte
<p>This question is similar to the <a href="http://stackoverflow.com/questions/321370/convert-hex-string-to-byte-array">one here</a>. </p>

<p>One can easily convert from hex string to byte via the following formula:</p>

<pre><code>    public static byte[] HexStringToBytes(string hex)
    {
        byte[] data = new byte[hex.Length /2];
        int j = 0;
        for (int i = 0; i &lt; hex.Length; i+=2)
        {
            data[ j ] = Convert.ToByte(hex.Substring(i, 2), 16);
            ++j;
        }
        return data;
    }
</code></pre>

<p>But is there a built-in function ( inside .net framework) for this?</p>
