Use byte[] as key in Dictionary
<p>I need to use a <code>byte[]</code> as a key in a <code>Dictionary</code>.  Since <code>byte[]</code> doesn't override the default <code>GetHashCode</code> method, two separate <code>byte[]</code> objects that contain the same data will use two separate slots in the dictionary.  Basically what I want is this:</p>

<pre><code>Dictionary&lt;byte[], string&gt; dict = new Dictionary&lt;byte[], string&gt;();
dict[new byte[] {1,2,3}] = "my string";
string str = dict[new byte[] {1,2,3}];
// I'd like str to be set to "my string" at this point
</code></pre>

<p>Is there a simple way to do this?  The only thing I can think of would be to build a wrapper class that just contains a <code>byte[]</code> and override <code>GetHashCode</code> based on the contents of the <code>byte[]</code>, but this seems error prone.</p>
