I am writting a plugin for a program, and I want to put my code inside a DLL so I can share the plugin freely without exposing (giving away) my code.
Here is the bas
Found exactly what I was looking for, here it is:
using System.Reflection;
using System.IO;
try
{
Assembly a = null;
a = Assembly.LoadFrom(Application.StartupPath startupPath + "MyAssembly.dll");
Type classType = a.GetType("MyNamespace.MyClass");
object obj = Activator.CreateInstance(classType);
MethodInfo mi = classType.GetMethod("MyMethod");
mi.Invoke(obj, null);
}
catch (Exception e)
{
AddLog(e.Message);
}