title: Removing matching characters between two strings
body: <p>I want to remove the characters which are matching between the two given strings. Eg.</p>
  
  <pre><code>string str1 = "Abbbccd";
  string str2 = "Ebbd";
  </code></pre>
  
  <p>From these two strings I want the output as:</p>
  
  <p><code>"Abcc"</code>, only those many matching characters should be removed from str1,which are present in str2.</p>
  
  <p>I tried the following code:</p>
  
  <pre><code>   public string Sub(string str1, string str2)
     {
         char[] arr1 = str1.ToCharArray();
         char[] arr2 = str2.ToCharArray();
  
         char[] arrDifference = arr1.Except(arr2).ToArray();
         string final = new string(arrDifference);
  
         return final;
     }
  </code></pre>
  
  <p>With this code I get the output as <code>"Ac"</code>. It removes all the matching characters between two arrays and stores 'c' only once.</p>