Activator.CreateInstance question

G

Guest

Hello

Is it possible to call Activator.CreateInstance if the type is not compiled into an assembly. For instance if I drop a DLL into the same folder where executable is running, will the executable be able to create a type that is defined in this DLL

If not, what is the way to do this

-thanks
 
K

Klaus H. Probst

Yes, but you need to load the assembly into the app domain first. Or, use
the overload of CreateInstance that supports doing this in one swoop.


--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/


sean said:
Hello-

Is it possible to call Activator.CreateInstance if the type is not
compiled into an assembly. For instance if I drop a DLL into the same folder
where executable is running, will the executable be able to create a type
that is defined in this DLL?
 

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