title: c# Dictionary: making the Key case-insensitive through declarations
body: <p>I have a <code>Dictionary&lt;string, object&gt;</code> dictionary.  It used to be <code>Dictionary&lt;Guid, object&gt;</code> but other 'identifiers' have come into play and the Keys are now handled as strings.</p>
  
  <p>The issue is that the <code>Guid</code> keys from my source data are coming as <code>VarChar</code>, so now a key of <code>"923D81A0-7B71-438d-8160-A524EA7EFA5E"</code> is not the same as <code>"923d81a0-7b71-438d-8160-a524ea7efa5e"</code> (wasn't a problem when using Guids).</p>
  
  <p>What's really nice (and sweet) about the .NET framework is that I can do this:</p>
  
  <pre><code>Dictionary&lt;string, CustomClass&gt; _recordSet = new Dictionary&lt;string, CustomClass&gt;(
      StringComparer.InvariantCultureIgnoreCase);
  </code></pre>
  
  <p>And that works great. But what about a nested Dictionary?  Like the following:</p>
  
  <pre><code>Dictionary&lt;int, Dictionary&lt;string, CustomClass&gt;&gt; _customRecordSet 
      = new  Dictionary&lt;int, Dictionary&lt;string, CustomClass&gt;&gt;();
  </code></pre>
  
  <p>How would I specify the string comparer on a nested dictionary like this?</p>