Builtin Function to Convert from Byte to Hex String
<p>This is a question similar to <a href="http://stackoverflow.com/questions/2294153/a-builtin-function-to-convert-byte-to-string">this one here</a>.</p>

<p>Is there a built-in method that converts an array of byte to hex string? More specifically, I'm looking for a built in function for </p>

<pre><code>    /// &lt;summary&gt;
    /// Convert bytes in a array Bytes to string in hexadecimal format
    /// &lt;/summary&gt;
    /// &lt;param name="Bytes"&gt;Bytes array&lt;/param&gt;
    /// &lt;param name="Length"&gt;Total byte to convert&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    public static string ByteToHexString(byte[] Bytes, int Length)
    {
        Debug.Assert(Length &lt;= Bytes.GetLength(0));
        StringBuilder hexstr = new StringBuilder();

        for (int i = 0; i &lt; Length; i++)
        {
            hexstr.AppendFormat("{0,02:X}", Bytes[i]);
        }

        hexstr.Replace(' ', '0'); //padd empty space to zero

        return hexstr.ToString();
    }
</code></pre>
