Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

In my C# application, I want to decide at run time to load a managed DLL based on user input. I have a factory that returns an object that implements an interface, and the kind of object the factory will instantiate should be based on user input, as well as if the factory can find a particular managed DLL in the local directory.

 

If the user enters a particular value, and a matching DLL can be found, then the factory will load the DLL and instantiate an object from the DLL. If the DLL cannot be found, then the factory will load a "default" managed DLL and instantiate a dummy object which implements the expected interface.

 

What is the best way to do what I have described?

 

Bryan

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...