title: Add Items To a existing List In a dictionary
body: <p>I have a dictionary as below</p>
  
  <pre><code>var dicAclWithCommonDsEffectivity = new Dictionary&lt;string, List&lt;int&gt;&gt;();
  </code></pre>
  
  <p>I have a list as below </p>
  
  <pre><code>var dsList=new List&lt;int&gt;();
  </code></pre>
  
  <p>For each item in <code>dsList</code> I will search in <code>dicAclWithCommonDsEffectivity</code> dictionary for the matching values in the list. If i find a match I take its Keys and form a new Key combining all the keys. I will create a new list and add item.</p>
  
  <pre><code>foreach (int i in dsList)
  {
      var aclWithmatchingDS = dicAclWithCommonDsEffectivity.Where(x =&gt; x.Value.Contains(i)).Select(x=&gt;x.Key);
      if (aclWithmatchingDS.Count() &gt; 0)
      {
          string NewKey= aclWithmatchingDS.key1+","aclWithmatchingDS.key2 ;
  
          //if NewKey is not there in dictionary 
          var lst=new List&lt;int&gt;(){i};
          //Add item to dictionary
          //else if item is present append item to list
          //oldkey,{oldlistItem,i};
  
      }
  }
  </code></pre>
  
  <p>For the next item in dsList if there is a matching key then I have to add the item to the list inside new dictionary.</p>
  
  <p>How to add new item to the list in a dictionary without creating new list.</p>