Call Activator.CreateInstance in a dll to intance class that reside inside Asp.Net App_Code
Posted
by Fraga
on Stack Overflow
See other posts from Stack Overflow
or by Fraga
Published on 2010-04-14T23:33:43Z
Indexed on
2010/04/14
23:53 UTC
Read the original article
Hit count: 403
Help, here is the idea:
External.dll IMyClass NewCreated = (IMyClass)Activator.CreateInstance(Namespace.MyClass).UnWrap();
Asp.Net WebSite App_Code Namespace.MyClass.cs Bin External.dll
Is that even posible?
I have tried, a lot of posible combinations, like:
Assembly.GetCallingAssembly().CreateInstance("Namespace.MyClass") Activator.CreateInstance(AppDomain.CurrentDomain,"Namespace","Namespace.MyClass") Assembly.GetExecutingAssembly().CreateInstance("Namespace.MyClass")
© Stack Overflow or respective owner