I want to create a
TDictionary<string, class of TControl>
that - as you can see - holds pairs of strings and references to TControl class definition to be able to call Create method on the dictionary elements at runtime.
Can I?
The syntax you need is as follows:
type
TControlClass = class of TControl;
And then you can declare the dictionary:
var
Dict: TDictionary<string, TControlClass>;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With