I posted a question but need it clarified. I'm a beginner.
I'm not sure what the use of the term "strongly typed properties" means in this context? The syntax offered by the responder to my original post is what I'm after, but when I web search for this term, it only offers a definition and examples, not useful examples on how it's implemented in user defined classes.
Wouldn't this be best served with strongly typed properties, like h.Segments["PID"].Fields[5].Subfields[3].SubSubFields[2]? – Lasse Vågsæther Karlsen Aug 19 at 7:25
Overall, my aim is to
- parse in a text file with many messages
- loop through each message text (FS delimeted) and from that text create single message objects. Each of these messages have...
- one or many message segments which have
- one or many fields which have
- zero or many subfields which have
- zero or many sub-subfields
I'd ideally like to create and object like
HL7Message h = new HL7Message;
string name = h.segment[2].field[5].subfield[0];
How can I create and access an object whose properties have properties themselves?