using System.Reflection;
//dynamically load assembly from file name.dll
Assembly nameAss = Assembly.LoadFile("C:\\name.dll");
//get type of class name from just loaded assembly
Type nameType= presentation.GetType("namespace.class");
//create instance of class
object nameInstance = Activator.CreateInstance(nameType);
//invoke public instance method: public void setXValue(string strXValueName, int iValue)
nameType.InvokeMember("setXValue", BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public, null, nameInstance , new object[] { "OutputFile", outputFile });