Given a generic type
TMyClass <T> = class
...
end;
is there a way to put multiple instances (instantiated with different types) together like
FList : TList <TMyClass>;
FList.Add (TMyClass <Integer>.Create);
FList.Add (TMyClass <String>.Create);
or
FArray : array [0..1] of TMyClass;
FArray [0] := TMyClass <Integer>.Create;
FArray [1] := TMyClass <String>.Create;
I know that this code does not compile. But is it possible to achieve something like that?