Click here to Skip to main content
16,005,389 members
Home / Discussions / C#
   

C#

 
QuestionBug in VS.NET? Pin
Johnny Zee30-Jul-02 10:01
sussJohnny Zee30-Jul-02 10:01 
AnswerRe: Bug in VS.NET? Pin
Johnny Zee1-Aug-02 2:49
sussJohnny Zee1-Aug-02 2:49 
GeneralThe Web Service FREEZE the App Pin
laphijia30-Jul-02 9:05
laphijia30-Jul-02 9:05 
GeneralRe: The Web Service FREEZE the App Pin
James T. Johnson30-Jul-02 16:56
James T. Johnson30-Jul-02 16:56 
GeneralLate binding to objects... Pin
Ryan Cromwell30-Jul-02 7:47
Ryan Cromwell30-Jul-02 7:47 
GeneralRe: Late binding to objects... Pin
Andy Smith30-Jul-02 8:34
Andy Smith30-Jul-02 8:34 
GeneralRe: Late binding to objects... Pin
Ryan Cromwell30-Jul-02 8:44
Ryan Cromwell30-Jul-02 8:44 
GeneralRe: Late binding to objects... Pin
Eric Gunnerson (msft)30-Jul-02 8:54
Eric Gunnerson (msft)30-Jul-02 8:54 
You won't have to if you use an interface.

Here's what you need to do:

1) Write an interface that describes the add-in.
2) Build it to a separate assembly.
3) Reference that assembly both in your main program and in the add-in.

Then it's merely a matter of loading the assembly, finding all the types that implement the interface, creating an instance, and casting it to an interface.

If you look on http://www.gotdotnet.com/team/csharp, you'll find two examples of doing this.

On the information page, there's an "execution time code generation" section that does something nearly identical to what you want to do (from the loading perspective).

On the main page, there's a column on app domains and dynamic loading that does something similar, though it's delegate based instead of interface based.

Hope that helps.
GeneralRe: Late binding to objects... Pin
Ryan Cromwell30-Jul-02 9:04
Ryan Cromwell30-Jul-02 9:04 
GeneralRe: Late binding to objects... Pin
Ryan Cromwell30-Jul-02 9:33
Ryan Cromwell30-Jul-02 9:33 
GeneralRe: Late binding to objects... Pin
Eric Gunnerson (msft)30-Jul-02 9:49
Eric Gunnerson (msft)30-Jul-02 9:49 
GeneralRe: Late binding to objects... Pin
leppie31-Jul-02 2:12
leppie31-Jul-02 2:12 
GeneralRe: Late binding to objects... Pin
Eric Gunnerson (msft)31-Jul-02 6:48
Eric Gunnerson (msft)31-Jul-02 6:48 
QuestionWhy does OleDbDataAdaptor do this? Pin
Zombies with Coffee, LLC30-Jul-02 5:51
professionalZombies with Coffee, LLC30-Jul-02 5:51 
AnswerRe: Why does OleDbDataAdaptor do this? Pin
Zombies with Coffee, LLC30-Jul-02 6:18
professionalZombies with Coffee, LLC30-Jul-02 6:18 
Generalimplicit cast Pin
Christian Graus30-Jul-02 4:23
protectorChristian Graus30-Jul-02 4:23 
GeneralRe: implicit cast Pin
Nish Nishant30-Jul-02 5:23
sitebuilderNish Nishant30-Jul-02 5:23 
GeneralRe: implicit cast Pin
Christian Graus30-Jul-02 12:27
protectorChristian Graus30-Jul-02 12:27 
GeneralRe: implicit cast Pin
James T. Johnson30-Jul-02 16:22
James T. Johnson30-Jul-02 16:22 
GeneralRe: implicit cast Pin
Christian Graus30-Jul-02 17:17
protectorChristian Graus30-Jul-02 17:17 
GeneralDLL Hell Pin
gekoscan30-Jul-02 2:38
gekoscan30-Jul-02 2:38 
GeneralRe: DLL Hell Pin
Eric Gunnerson (msft)30-Jul-02 8:48
Eric Gunnerson (msft)30-Jul-02 8:48 
GeneralPutting bitmap to RTF Pin
tomiga29-Jul-02 20:59
tomiga29-Jul-02 20:59 
GeneralRe: Putting bitmap to RTF Pin
leppie30-Jul-02 0:52
leppie30-Jul-02 0:52 
GeneralRe: Putting bitmap to RTF Pin
tomiga30-Jul-02 1:08
tomiga30-Jul-02 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.