Ejemplo n.º 1
0
    public static void Main(string[] args)
    {
        var a = new CustomType1();

        a.InterfaceMethod(32);
        a.InterfaceMethod("a");

        IInterface b = a;

        b.InterfaceMethod(32);
        b.InterfaceMethod("b");
    }
Ejemplo n.º 2
0
    public static void Main(string[] args)
    {
        var a = new CustomType1();

        a.InterfaceMethod(32);
        IInterface b = a;

        b.InterfaceMethod(32);

        a.InterfaceProperty = 16;
        Console.WriteLine(a.InterfaceProperty);
        Console.WriteLine(b.InterfaceProperty);

        b.InterfaceProperty = 17;
        Console.WriteLine(a.InterfaceProperty);
        Console.WriteLine(b.InterfaceProperty);
    }