Web Log di Adrian Florea

"You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away." Antoine de Saint-Exupery
posts - 440, comments - 2715, trackbacks - 3944

My Links

Archives

Post Categories

Image Galleries

.RO Blogs

.RO People

.RO Sites

Blogs

Furls

Links

vinCitori

Quiz Sharp #66 [junior]

Questi due snippet compilano senza errori o warning e sembrano equivalenti, ma non lo sono:

using System;

delegate Foo Foo();

class Test {
    static Foo Quiz() {
        Console.WriteLine("*");
        return Test.Quiz;
    }

    static void Main() {
        Quiz()()();
    }
}
imports System

delegate function Foo as Foo

class Test
    shared function Quiz as Foo
        Console.WriteLine("*")
        return Test.Quiz
    end function

    shared sub Main
        Quiz()()()
    end sub
end class

Cosa manca allo snippet VB.NET per essere equivalente a quello C#?

Print | posted on lunedì 24 settembre 2007 08:44 | Filed Under [ Quiz Sharp ]

Powered by:
Powered By Subtext Powered By ASP.NET