Exemplo 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");
    }
Exemplo n.º 2
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");
    }
Exemplo n.º 3
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);
    }
Exemplo n.º 4
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);
    }