public static void Main () {
        // This works:
        HelloPrinter printer = new HelloPrinter();
        ActionCaller.Call(printer.Print);

        // This doesn't:
        ActionCaller.Call(((IHelloPrinter)printer).Print);
    }
Exemplo n.º 2
0
    public static void Main()
    {
        // This works:
        HelloPrinter printer = new HelloPrinter();

        ActionCaller.Call(printer.Print);

        // This doesn't:
        ActionCaller.Call(((IHelloPrinter)printer).Print);
    }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     HelloPrinter.Print();
 }