title: how to merge two csv files with different columns and rows in c#
body: <p>I'm trying to merge two csv files which have different headers and different number of rows/lines.
  Using the following code, but doesn't get correct output. It's working when rows are same.</p>
  
  <pre><code>var first = File.ReadAllLines("firstfile.csv");
  var second = File.ReadAllLines("secondfile.csv");
  var result = first.Zip(second, (f, s) =&gt; string.Join(",", f, s));
  File.WriteAllLines("combined.csv", result);
  </code></pre>
  
  <p>for ex:
  firstfile is</p>
  
  <pre><code>col1,colb,colc
  a,b,c
  a,v,f
  </code></pre>
  
  <p>the secondfile is</p>
  
  <pre><code>colx,coly
  x,y
  cc,aa
  bb,vv
  m,n
  </code></pre>
  
  <p>the output is get</p>
  
  <pre><code>col1,colb,colc,colx,coly
  a,b,c,x,y
  a,v,f,cc,aa
  </code></pre>
  
  <p>the second file rows are missiing.
  my expected output is</p>
  
  <pre><code>col1,colb,colc,colx,coly
  a,b,c,x,y
  a,v,f,cc,aa
  ,,,bb,vv
  ,,,m,n
  </code></pre>