In the .csv file there are 4 columns, you only need to read the information from the first column. While I see the solution only through regular expressions.

Tell me, maybe there is a simpler way?

    2 answers 2

    If you break a string with commas and save only the first column:

    List<string> parsed = new List<string>(); using (StreamReader reader = new StreamReader("...")) { string row; while ((row = reader.ReadLine()) != null) { parsed.Add(row.Split(',')[0]); } } 

      At least two solutions:

      1. Read everything to a comma and go to the next line.
      2. Read the line through split (depending on the language), create an array and rip out only the first element