How does a dictionary whose key is a List behave?
<p>I'm working with legacy code and I see a dictionary whose key is a list of objects...</p>

<pre><code>var myCrazyDictionary = new Dictionary&lt;List&lt;MyKeyObject&gt;, List&lt;MyValueObject&gt;&gt;();
</code></pre>

<p>How does such a dictionary behave? You know, because of reference types...</p>

<p>Is it working magically like so?</p>

<pre><code>// ????
myCrazyDictionary.Add(new List&lt;MyKeyObject&gt; { new MyKeyObject { Key1 = "1", Key2 = 2 } }, new List&lt;MyValueObject&gt; { new MyValueObject { Value = "!" } });

// ???????????
var result = myCrazyDictionary[new List&lt;MyKeyObject&gt; { new MyKeyObject { Key1 = "1", Key2 = 2 } }];
// Will this hold the value: "!" or crash or something else?
var byWhatBlackMagic = result[0].Value;
</code></pre>