Ok. I have created a DataType that I want to use. Here is the code:
Public Type TTRansAE
Body As String * 24
CD As OutboundTransactionType
BeginStamp As String * 10
EndStamp As String * 10
ExceptionCode As String * 1
AddDelete As String * 1
CD is defined as OutboundTransactionType. This is a Public Enum (1-12)
So this works. I am able to build my object and send it to my Processing Function. In my processing function I am sending out messages over a wireless network. The problem is I have to send it to my API as a string. So I have to concantenate all values of the object into a string.
string = Trans.Body&Trans.CA&Trans.BeginStamp& ...etc.
Except, I want to build this into its own routine so that I can pass it different transaction types that may have more or less properties. So I was trying to add a "Count" property of the Type that I can set it be the number of properties. (So I can loop). Except you can't reference properties of a type by an index (or counter). So do I have to build a Collection? I was thinking an Attributes collection that would have the Key/Value combo for each property and is accessible through an indexed value.
Transaction.Attributes(0).value = "Test" would be the same as
Transaction.Attributes("Body").value = "Test" would be the same as
Transaction.Body = "Test".
Am I completely off base? Is this possible?:(