JoshClose/CsvHelper — pull request #35 by JRusbatch (2012-06-05 16:35:53+00:00)
Title: Subclassing CsvReader breaks the GetRecord method.

When calling the `GetRecord` method on an instance of a class that inherits from `CsvReader`, the following exception is thrown:

```
System.ArgumentException: ParameterExpression of type cannot be used for delegate parameter of type 'CsvHelper.CsvReader'
at System.Linq.Expressions.Expression.ValidateLambdaArgs(Type delegateType, Expression& body, ReadOnlyCollection`1 parameters)
at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, String name, Boolean tailCall, IEnumerable`1 parameters)
at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, Boolean tailCall, IEnumerable`1 parameters)
at CsvHelper.CsvReader.GetReadRecordFunc(Type recordType) CsvReader.cs:line 762
at CsvHelper.CsvReader.GetRecord(Type type) CsvReader.cs:line 513
```

I created a test that reproduces the issue, and adjusted the code in `CsvReader.GetReadRecordFunc()` to create a an `Expression>` instead of `Expression>`.