I have a snippet of code in my application (which references System.Windows.Forms) which attempts to resolve type information for a Form class like so:
Type tForm = Type.GetType("System.Windows.Forms.Form");
dynamic instance = Activator.CreateInstance(tForm);
but Activator.CreateInstance fails because tForm is null.
How do I solve this?
EDIT: Types MUST be resolvable at runtime!
You need to use assembly-qualified name of the type