Пример #1
0
    private static void Main(string[] args)
    {
        // suppose it's from another assembly, and you don't have direct reference to type
        var      c     = Activator.CreateInstance(typeof(MyClass));
        IMyClass iface = c.ActLike <IMyClass>();

        iface.method1();
        Console.ReadKey();
    }