Design pattern for grouping fields and structuring data in a flat file
问题 I am using the FileHelpers C# library to read a file into an array of custom objects that will be processed. For instance, a partial file definition: [FixedLengthRecord] public class Row { [FieldFixedLength(9)] [FieldTrim(TrimMode.Right)] public string Ssn; [FieldFixedLength(15)] [FieldTrim(TrimMode.Right)] public string LastName; ... } I'm trying to abide by OOP principles while doing this and I've noticed that some fields have a natural grouping (e.g. SSN and ClientID , EmployerID and