title: c# Remove rows from csv
body: <p>I have two csv files. In the first file i have a list of users, and in the second file i have a list of duplicate users. Im trying to remove the rows in the first file that are equal to the second file.</p>
  
  <p>Heres the code i have so far:</p>
  
  <pre><code>StreamWriter sw = new StreamWriter(path3);
          StreamReader sr = new StreamReader(path2);
  
          string[] lines = File.ReadAllLines(path);
  
          foreach (string line in lines)
          {
              string user = sr.ReadLine();
  
              if (line != user) 
              {
                  sw.WriteLine(line);
  
              }
  </code></pre>
  
  <p>File 1 example:</p>
  
  <pre><code>Modify,ABAMA3C,Allpay - Free State - HO,09072701
  
  Modify,ABCG327,Processing Centre,09085980
  </code></pre>
  
  <p>File 2 Example:</p>
  
  <pre><code>Modify,ABAA323,Group HR Credit Risk &amp; Finance
  
  Modify,ABAB959,Channel Sales &amp; Service,09071036
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p>Thanks.</p>