I have a routine, GetClass, that converts a properly formatted array of strings in the form ‘name = value’ into a class object and populates the class with the value for each name.
For example, a disk file might read:
WindowCount = 3
WindowBorder = Blue
WindowVisible = False
My routine will load this file from disk, and populate an instance of a class with the properties WindowCount, WindowBorder, and WindowVisible.
So far so good.
Now I want to create an array of class objects. The routine is something like this:
Boolean GetClassArray (pList() As String, pClass() as Object)
Somewhere in this routine, I want to add a new row to the array pClass. Normally I would do this by:
DIM NewClassElement AS NEW ClassType
But in this case, I do not know the class (ClassType) of pClass, which is a parameter passed to this routine. How do I accomplish this?