title: How do I write this c++ snippet with C#
body: <p>See the following code in C++:</p>
  
  <pre><code>unordered_map&lt;int, vector&lt;int&gt;&gt; indexes;
  for (int i = 0; i &lt; n; i++){
      int tmp = 1;
      indexes[tmp].push_back(i);
  }
  vector&lt;int&gt;v = indexes[i];
  </code></pre>
  
  <p>How do I write this in C#? So far I've written this:</p>
  
  <pre><code>Dictionary&lt;int, List&lt;int&gt;&gt; indexes = new Dictionary&lt;int, List&lt;int&gt;&gt;();
  for(int i=0;i&lt;n;i++){
     int tmp = 1;
     indexes.Add(tmp,new List&lt;int&gt;(i));
  }           
  List&lt;int&gt; v = new List&lt;int&gt;(indexes[i]);
  </code></pre>
  
  <p>But Im facing issues with the expression
  <code>List&lt;int&gt; v = new List&lt;int&gt;(indexes[i]);</code> and throws exception: </p>
  
  <blockquote>
    <p>The best overloaded method match for
    <code>System.Collections.Generic.List&lt;int&gt;.Add(int)' has some invalid arguments Argument</code>#1' cannot convert
    <code>System.Collections.Generic.List&lt;int&gt;' expression to type</code>int</p>
  </blockquote>