FileHelpers
FileHelpers copied to clipboard
Array of complex data into FixedLengthRecord - how ?
` [FixedLengthRecord(FixedMode.AllowLessChars)] public class Customer { [FieldFixedLength(5)] public int CustId;
[FieldFixedLength(30)]
[FieldTrim(TrimMode.Both)]
public string Name;
[FieldFixedLength(8)]
[FieldConverter(ConverterKind.DateMultiFormat, "ddMMyyyy", "MMyyyy")]
public DateTime AddedDate;
[???] public Address[] Adresses
}`
`[FixedLengthRecord(FixedMode.AllowLessChars)] public class Address { [FieldFixedLength(5)] public int AddId;
[FieldFixedLength(30)]
public string City;
[FieldFixedLength(30)]
public string Street;
[FieldFixedLength(8)]
public string Number;
}`
What I should make into Attributes for this part of class (array of Address[] class)
[???] public Address[] Adresses
I found this useful when I had the problem https://github.com/MarcosMeli/FileHelpers/blob/ecc07e9e7942394f987af0cafd1ef6ca10a5ffe2/FileHelpers.Tests/Tests/Common/ArrayFields.cs#L536