Q:

c# loading assembly at runtime

using System.Reflection;

var dll = Assembly.LoadFile(@"C:\assembly.dll"); // full path requied
Type type = dll.GetType("myNamespace.myClass");
dynamic c = Activator.CreateInstance(type);
c.myPublicMethod();
1

Tags

New to Communities?

Join the community