-
Notifications
You must be signed in to change notification settings - Fork 349
Open
Labels
Description
There seems to be a discrepancy in how the library detects auto-implemented properties in VB vs C#
I created two brand-new MVC projects for testing.
- Visual Studio 2015 Update 1
- Projects targeted for .NET 4.5.2
- Installed FileHelpers from NuGet, Version 3.1.5 (8/7/2015)
C#
[IgnoreFirst]
[DelimitedRecord(",")]
public class WrkShop
{
public string Title { get; set; }
//plus other properties
}
//Instantiating WORKS
FileHelperEngine<WrkShop> engWrkShop = new FileHelperEngine<WrkShop>();VB
<IgnoreFirst>
<DelimitedRecord(",")>
Public Class WrkShop
Public Property Title As String
'plus other properties
End Class
'Instantiating THROWS AN EXCEPTION
Dim EngWrkShop As FileHelperEngine(Of WrkShop) = New FileHelperEngine(Of WrkShop)
Stack Trace
[ArgumentNullException: Value cannot be null.
Parameter name: name]
System.Type.GetProperty(String name) +11434556
FileHelpers.FieldBase.CreateField(FieldInfo fi, TypedRecordAttribute recordAttribute) +1549
FileHelpers.RecordInfo.CreateCoreFields(IList`1 fields, TypedRecordAttribute recordAttribute) +93
markhewett