FileHelpers icon indicating copy to clipboard operation
FileHelpers copied to clipboard

Array of complex data into FixedLengthRecord - how ?

Open ch0mik opened this issue 6 years ago • 1 comments

` [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

ch0mik avatar Oct 04 '19 11:10 ch0mik

I found this useful when I had the problem https://github.com/MarcosMeli/FileHelpers/blob/ecc07e9e7942394f987af0cafd1ef6ca10a5ffe2/FileHelpers.Tests/Tests/Common/ArrayFields.cs#L536

ianpowell2017 avatar Aug 12 '24 09:08 ianpowell2017