title: Removing columns in CSV file using c#
body: <p>I want to remove a column with a specific value. The code below is what I used to remove a row. Can I reverse this to remove a column?</p>
  
  <pre><code>int row = comboBox1.SelectedIndex;
  string verw = Convert.ToString(txtChange.Text);
  
  List&lt;string&gt; lines = new List&lt;string&gt;();
  using (StreamReader reader = new StreamReader(System.IO.File.OpenRead(filepath)))
  {
      string line;
      while ((line = reader.ReadLine()) != null)
      {
          if (line.Contains(","))
          {
              string[] split = line.Split(',');
  
              if (split[row] == kill) 
              {
                  //achter split vul je de rij in 
              }
              else
              {
                  line = string.Join(",", split);
                  lines.Add(line);
              }
          }
      }
  }
  using (StreamWriter writer = new StreamWriter(path, false))
  {
      foreach (string line in lines)
          writer.WriteLine(line);
  }
  </code></pre>