Example #1
0
    static void Main(string[] args)
    {
        MyClass      A   = new MyClass();
        MyInterface1 AI1 = A;
        MyInterface2 AI2 = A;

        Console.WriteLine(A.Method2(42) + " " + A.Method((char)42));
        Console.WriteLine(AI1.Method((char)42) + " " + AI2.Method2(42));
        Console.ReadKey();
    }
Example #2
0
    static void Main(string[] args)
    {
        MyClass A = new MyClass(42, "Hi!");

        A.Method();
        MyInterface1 B = A;

        B.Method();
        Console.ReadKey();
    }