title: Read all values from CSV into a List using CsvHelper
body: <p>So I've been reading that I shouldn't write my own CSV reader/writer, so I've been trying to use the CsvHelper library installed via nuget. The CSV file is a grey scale image, with the number of rows being the image height and the number columns the width. I would like to read the values row-wise into a single <code>List&lt;string&gt;</code> or <code>List&lt;byte&gt;</code>.</p>
  
  <p>The code I have so far is:</p>
  
  <pre><code>using CsvHelper;
  
  public static List&lt;string&gt; ReadInCSV(string absolutePath)
  {
      IEnumerable&lt;string&gt; allValues;
  
      using (TextReader fileReader = File.OpenText(absolutePath))
      {
          var csv = new CsvReader(fileReader);
          csv.Configuration.HasHeaderRecord = false;
          allValues = csv.GetRecords&lt;string&gt;
      }
  
      return allValues.ToList&lt;string&gt;();
  }
  </code></pre>
  
  <p>But <code>allValues.ToList&lt;string&gt;()</code> is throwing a:</p>
  
  <p><em>CsvConfigurationException was unhandled by user code</em></p>
  
  <p><em>An exception of type 'CsvHelper.Configuration.CsvConfigurationException' occurred in CsvHelper.dll but was not handled in user code</em></p>
  
  <p><em>Additional information: Types that inherit IEnumerable cannot be auto mapped. Did you accidentally call GetRecord or WriteRecord which acts on a single record instead of calling GetRecords or WriteRecords which acts on a list of records?</em></p>
  
  <p><code>GetRecords</code> is probably expecting my own custom class, but I'm just wanting the values as some primitive type or string. Also, I suspect the entire row is being converted to a single string, instead of each value being a separate string.</p>