title: CsvHelper discards row if there is a missing field
body: <p>I have a CSV files that can be structured similar to the following:</p>
  
  <pre><code>Header1,Header2,Header3 
  1,2,3 
  5,,6 
  4,4,4
  </code></pre>
  
  <p>When using Josh Close's CsvHelper and calling <code>GetRecords&lt;T&gt;</code> as per:</p>
  
  <pre><code>List&lt;TestData&gt; data = csvReader.GetRecords&lt;TestData&gt;();
  </code></pre>
  
  <p>The list of data does not contain the second row. I've tinkered with the settings and tried to implement a double converter that accepts an empty string and returns '0' when empty however the row still gets discarded. <strong>I'm trying to avoid doing a manual get for each field.</strong> However, I would still be happy with a row by row solution, i.e. <code>csvReader.GetRecord&lt;TestData&gt;()</code> nested in a loop.</p>
  
  <p>I have the following test code:</p>
  
  <pre><code>public class When_importing_csv_with_missing_filed
  {
      [Test]
      public void Dont_discard_the_row_with_missing_field()
      {
          using (TextReader textReader = new StreamReader("Test.csv"))
          {
              Assert.IsTrue(File.Exists("Test.csv"));
              var reader = new CsvReader(textReader);
              reader.Configuration.RegisterClassMap&lt;TestMap&gt;();
              reader.Configuration.IgnoreReadingExceptions = true;
              reader.Configuration.SkipEmptyRecords = false;
              List&lt;TestData&gt; testData = reader.GetRecords&lt;TestData&gt;().ToList();
          }
      }
  }
  
  public class TestMap : CsvClassMap&lt;TestData&gt;
  {
      public override void CreateMap()
      {
          Map(m =&gt; m.Header1).Name("Header1").TypeConverter&lt;DoubleConverter&gt;();
          Map(m =&gt; m.Header2).Name("Header2").TypeConverter&lt;NullValueTypeConverter&gt;();
          Map(m =&gt; m.Header3).Name("Header3").TypeConverter&lt;DoubleConverter&gt;();
      }
  }
  
  public class NullValueTypeConverter : DoubleConverter
  {
      public override object ConvertFromString(TypeConverterOptions options, string text)
      {
          return String.IsNullOrEmpty(text) ? 0 : base.ConvertFromString(options, text);
      }
  
      public override bool CanConvertFrom(Type type)
      {
          return type == typeof(string);
      }
  }
  
  public class TestData
  {
      public double? Header1 { get; set; }
      public double? Header2 { get; set; }
      public double? Header3 { get; set; }
  }
  </code></pre>
  
  <p>Over to you..</p>