Load form by reflection

G

Guest

Hi

I try load a form by reflection :

Assembly myAssembly = Assembly.LoadFrom(dtr.GetString(0));
Form frmForm = myAssembly.CreateInstance("Nox.Grade") as Form;

but a NullReferenceException is generated.

If I use

Type type = Assembly.GetType("Nox.Grade")

it's Ok.

What is wrong ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top