I need a little help. I'm new to thinking. We use a third-party api, and it returns a class called "AddressList". It has public properties, which are literally called Address1, Address1Name, Address1Desc, Address2, Address2Name, Address2Desc, Address3, Address3Name, Address3Desc, ... Address99, Address99Name, Address99Desc .. There are also several other properties. I have a class called "SimpleAddress" that has only 3 properties (address, name, description). What I want to do is when I return the class of the class "AddressList", I would like the AddressDesc1 loop ... through AddressDesc99 ... and whichever is neither empty nor empty, I would like to instantiate " SimpleAddress ", fill in its properties and add it to the list ...Can someone point me in the right direction? Obviously, it would be better if "AddressList" was a kind of collection, but unfortunately this is not so. It is generated from the mainframe return line.
Thanks for any help, ~ ck in San Diego
source
share