title: Add Dictionary To Dictionary List
body: <p>I have the code like as below:</p>
  <pre><code>static void Main(string[] args)
  {
      List&lt;Dictionary&lt;string, string&gt;&gt; abc = new List&lt;Dictionary&lt;string, string&gt;&gt;();
  
      Dictionary&lt;string, string&gt; xyz = new Dictionary&lt;string, string&gt;();
      Dictionary&lt;string, string&gt; klm = new Dictionary&lt;string, string&gt;();
  
      xyz.Add(&quot;xyz_1&quot;, &quot;4&quot;);
      xyz.Add(&quot;xyz_2&quot;, &quot;5&quot;);
  
      klm.Add(&quot;klm_1&quot;, &quot;9&quot;);
      klm.Add(&quot;klm_2&quot;, &quot;8&quot;);
  
      abc.Add(xyz);
      xyz.Clear();
      /*after this code xyz clear in my abc list. Why ?*/
      abc.Add(klm);
  }
  </code></pre>
  <p>I am creating list of dictionaries. And then I am adding dictionaries to this list. But when added, I am running clear function on my Dictionary, then it is getting deleted from my list as well. Normally my 'abc' list should have xyz, and klm dictionaries with their values. But xyz value count will be 0 after running clear(). How can I prevent this situation?</p>