When serializing a DTO to CSV using .ToCSV()
extension is it possible to specify the field order via the DataMemberAttribute
Order property?
[DataMember(Order = 0)]
public string AGENT_REF { get; set; }
[DataMember(Order = 1)]
public string ADDRESS_1 { get; set; }
// snipped
[DataMember(IsRequired = true, Order = 6)]
[StringLength(10)]
public string POSTCODE2 { get; set; }
[DataMember(IsRequired = true, Order = 7)]
public string FEATURE1 { get; set; }
[DataMember(IsRequired = true, Order = 8)]
public string FEATURE2 { get; set; }
Currently values are serialized in order configured by ‘TypeConfig’ Init()
method:
Not sure if this use case is (or can be) supported?