title: C# Replace all characters in string with value of character key in dictionary
body: <p>hi i have this dictionary</p>
  
  <pre><code>Dictionary&lt;char, string&gt; keys = new Dictionary&lt;char, string&gt;();
  keys.Add("a", "23");
  keys.Add("A", "95");
  keys.Add("d", "12");
  keys.Add("D", "69");
  </code></pre>
  
  <p>and for example this string </p>
  
  <pre><code>string text = "Dad";
  </code></pre>
  
  <p>i want to encrypt the string with dictionary keys and values!<br>
  the final encrypted string will be:<br>
  <strong>692312</strong></p>
  
  <p>anyone can  help?!</p>