// 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; class TestClass { public static void Test(string dllname, string classname, int v, int offset) { Assembly asm = Assembly.Load(dllname); object[] ctorcallargs = { v, offset }; A o = (A)asm.CreateInstance(classname, false, BindingFlags.Public | BindingFlags.Instance, null, ctorcallargs, null, null); o.Show(); } public static void Main(string[] args) { Test("C", "C", 1, 2); } }