title: What is the best C# collection with two keys and an object?
body: <p>I've got a <strong>MenuManager</strong> class to which each module can add a key and and element to be loaded into the main content:</p>
  
  <pre><code>private Dictionary&lt;string,object&gt; _mainContentItems = new Dictionary&lt;string,object&gt;();
  public Dictionary&lt;string,object&gt; MainContentItems
  {
      get { return _mainContentItems; }
      set { _mainContentItems = value; }
  }
  </code></pre>
  
  <p>So the customer module registers its views like this:</p>
  
  <pre><code>layoutManager.MainContentViews.Add("customer-help", this.container.Resolve&lt;HelpView&gt;());
  layoutManager.MainContentViews.Add("customer-main", this.container.Resolve&lt;MainView&gt;());
  </code></pre>
  
  <p>So then later to bring a specific view to the front I say:</p>
  
  <pre><code>layoutManager.ShowMainContentView("customer-help");
  </code></pre>
  
  <p>And to get the default view (first view registered), I say:</p>
  
  <pre><code>layoutManager.ShowDefaultView("customer");
  </code></pre>
  
  <p>And this works fine.</p>
  
  <p>However, I want to eliminate the "code smell" with the hyphen which separates module name and view name, so I would like to register with this command:</p>
  
  <pre><code>layoutManager.MainContentViews.Add("customer","help", this.container.Resolve&lt;HelpView&gt;());
  </code></pre>
  
  <p><strong>But what is the best way to replace my current Dictionary, e.g. what comes to mind are these:</strong></p>
  
  <ul>
  <li><code>Dictionary&lt;string, string, object&gt; (doesn't exist)</code></li>
  <li><code>Dictionary&lt;KeyValuePair&lt;string,string&gt;, object&gt;</code></li>
  <li><code>Dictionary&lt;CUSTOM_STRUCT, object&gt;</code></li>
  </ul>
  
  <p>The new collection needs to be able to do this:</p>
  
  <ul>
  <li>get a view with module and view key (e.g. "customer", "help" returns 1 view)</li>
  <li>get a collection of all views by module key (e.g. "customer" returns 5 views)</li>
  </ul>