Dynamic Binding to an Object in WinForm App

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to load an assembly dynamically in a windows form application and
bind to one of the interfaces contained in it.
I can successfully load the assembly into memory and create the object which
is a Form. But how do I bind to an interface the Form has implemented with
out making a project reference to the assembly that contains the interface? I
want the executable to interoperate with the Dynamic Loaded Form via
Interface only. I believe I am pushing the limits of .NET. But then again I
may just be ignorant. If anyone has any comments please share.
 
Hi,

Then you obviously need to declare the commonplace interface elsewhere -
specifically, in another assembly. This approach also works well with
remoting - you declare all the interfaces in an interface-only assembly, and
then both the client and the server reference this assembly.
 
Back
Top