C# Reflection: Instantiate an object with string class name

后端 未结 6 1951
礼貌的吻别
礼貌的吻别 2020-12-30 10:22

my situation is the next: I\'m working with Visual C# 2010 express developing a Windows Forms Application. When the user logins, dinamically build a menustrip with options l

6条回答
  •  梦谈多话
    2020-12-30 11:06

    Try this

    Form frmConta= (Form)Activator.CreateInstance(null, "AccountingSA.Contabilidad").Unwrap();
    

提交回复
热议问题