// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Reflection; public class TestKlasse { public static void Main(string[] args) { Object o = Assembly.Load("DinAssembly").CreateInstance("DinKlasse"); o.GetType().InvokeMember("DinMetode", BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod, null, o, null); Object[] margs = { 123, "ABC" }; o.GetType().InvokeMember("DinAndenMetode", BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod, null, o, margs); } }