Is it possible for Tlists to containing different types?
The below code goes someway to hinting this is possible as I can add the 'tTestA' and 'tTestB' types to my single 'test' TList but I don't know how to go about running through this list using a 'for' loop.
I`m pretty new on this level of type-based coding so all help is much welcomed.
The below code goes someway to hinting this is possible as I can add the 'tTestA' and 'tTestB' types to my single 'test' TList but I don't know how to go about running through this list using a 'for' loop.
I`m pretty new on this level of type-based coding so all help is much welcomed.
Type tTestA Field Name:String="TESTA" End Type Type tTestB Field Name:String="TESTB" End Type Global Test:TList=New TList Test.addlast (New tTestA) Test.addlast (New tTestB) Test.addlast (New tTestB) Test.addlast (New tTestA) Test.addlast (New tTestB) For Local loop:Object=EachIn Test ''object' for 'loop' doesn't work. Print loop.name 'common field for both types Next