Ho to convert classname as string to a class ?
- by Roland Bengtsson
I have classnames in a stringlist. For example it could be
'TPlanEvent', 'TParcel', 'TCountry' etc.
Now I want to find out the sizes by looping the list.
It works to have:
Size := TCountry.InstanceSize;
But I want it like this:
for i := 0 to ClassList.Count - 1 do
Size := StringToClass(ClassList[i]).InstanceSize;
Obviously my question is what to write instead of method StringToClass to convert the string to a class.