using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
Assembly a = Assembly.LoadFrom(@"C: \Users\user\Documents\Visual Studio 2015\Projects\ClassLibrary1\ClassLibrary1\bin\Debug\ClassLibrary1.dll");
// Assembly a = Assembly.LoadFrom(@"C:\Users\user\Documents\Visual Studio 2015\Projects\ConsoleApplication6\ConsoleApplication6\bin\Debug\ConsoleApplication6.exe");
// Type t = typeof(Calculator);
Type t = a.GetType("ClassLibrary1.Calculator");
object cal = Activator.CreateInstance(t);
t.InvokeMember(
"print",
System.Reflection.BindingFlags.InvokeMethod| System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance,
Type.DefaultBinder,cal,
new object[] { (float)8.0,(float)3.0,(String)"sdfa"});
}
}
}