OK - I have a plug in framework where my application can have 3rd party plug-ins added via the .config file (provided they confrom to the IPlugIn interface...)

What I have so far reads the Type Name and checks if it supports the interface OK - but how do I instantiate an object of that type if it does?

I have.....
App.config
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
      <!-- Extra custom configuration sections -->
      <section name="printerEventListeners" 
type="PrinterMonitorService.CustomConfigurationSectionReaders.PrinterEventListenersSectionReader" />
     
   </configSections>
    
    <printerEventListeners>
       <!-- Key = the unique name by which the listener is known,
            ClassType = the full type name of the class implementing IPrinterEventListenerBase ,
            CommandLine = startup parameters for that class -->
       <printerEventListener key="printerEventListener1" 
           classType="PrinterMonitorService.PrinterMonitorLogfileListener"
           commandLine="c:\printerEventListener1.log" />
    </printerEventListeners>
Then in the application....
VB Code:
  1. For Each PrintJobListener In PrintJobListeners
  2.                 If PrintJobListener.ImplementingClassType.IsSubclassOf(GetType(PrintJobMonitorListenerBase)) Then
  3.                     '\\ Add an instance of the PrintJobMonitorListenerBase derived class...
  4.                     If ApplicationTracing.TraceVerbose Then
  5.                         Trace.WriteLine("PrintJobMonitorListenerBase derived class: " & PrintJobListener.ImplementingClassType.ToString, Me.GetType.ToString)
  6.                         '<-- What to put here ????
  7.                     End If
  8.                 End If
  9.             Next

Thanks in advance,
Duncan