frmMainPage
is a Form in my project.
This is correct
var myType = typeof(frmMainPage);
This is incorrect
Form frm = (Form)Activator.CreateInstance(Type.GetType("frmMainPage"), _userName);
var myType = typeof(frm);
How can I use typeof with a variable?