Here is how I did it:
Assembly assembly = Assembly.LoadFrom(assemblyName); System.Type type = assembly.GetType(typeName); Object o = Activator.CreateInstance(type); IYourType yourObj = (o as IYourType);
where assemblyName and typeName are strings, for example:
string assemblyName = @"C:\foo\yourDLL.dll"; string typeName = "YourCompany.YourProject.YourClass";
then you can call methods on your object:
yourObj.DoSomething(someParameter);
Of course, what methods you can call is determined by your IYourType interface ...
source share