title: Replace Dictionary values C#
body: <p>I have two dictionaries say</p>
  
  <pre><code>Dictionary&lt;int,string&gt; DictA=new Dictionary&lt;int,string&gt;();
  DictA.Add(1,"A");
  DictA.Add(2,"B");
  DictA.Add(3,"C");
  DictA.Add(4,"D");
  Dictionary&lt;string,string&gt; DictB=new Dictionary&lt;string,string&gt;();
  DictB.Add("A","A1");
  DictB.Add("C","C1");
  DictB.Add("D","D1");
  </code></pre>
  
  <p>Now I need a resultant dictionary as follows</p>
  
  <ul>
  <li>&lt;1,"A1"> </li>
  <li>&lt;2,"B"> //Since B is missing in Second Dictionary it should
  retain its old value</li>
  <li>&lt;3,"C1"></li>
  <li>&lt;4,"D1"></li>
  </ul>
  
  <p>I am not happy with the iterator code I wrote for this using <code>foreach</code>, but I am certain that there is very short and cleaner way to do this using Lambda Expressions. I am very new to them and finding them difficult to understand. </p>
  
  <p>Can someone explain a good resource to learn them and use efficiently with an example.</p>