Matthias Straka <(E-Mail Removed)> wrote:
> I have a project with a Dll and a exe. My dll has a set of functions that
> can activate some classes (these classes have all the same interface defined
> in the dll). That works fine with classes that are defined inside the Dll,
> but when I want to activate a class defined in my exe (which references the
> dll) the Type cannot get loaded. Is there any way to
> Type.GetType("classname.of.class.in.exe")-Create a Type in a function of the
> Dll?
You need to either get the assembly (either by finding it in the
already-loaded assemblies in the AppDomain, or loading it with
Assembly.Load) and call Assembly.GetType, or use GetType with the fully
qualified name of the type, including assembly information.
--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too