In the olden days of DEC/HP VMS Vax Basic, there was a way to define a record's fields and "map" that definition to an open file. When a record was read, the fields defined in the map were populated for that record without coding the parsing and setting. It used to look like this:
MAP (Bec) STRING Owner = 30%, LONG Vehicle_number, &
STRING Serial_number = 22%
OPEN "VEH.IDN" FOR INPUT AS FILE #2%, &
ORGANIZATION SEQUENTIAL FIXED, &
MAP Bec, ACCESS READ
INPUT "Which record do you want";A%
WHILE (A% <> 0%)
GET #2%, RECORD A%
PRINT "The vehicle number is", Vehicle_number
PRINT "The serial number is", Serial_number
PRINT "The owner of vehicle";Vehicle_number; "is", Owner
INPUT "Next Record";A%
NEXT
CLOSE #2%
END
I cannot find if there is anything similar in a .Net environment, specifically C#.