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 #56

Cosa stampa a console il seguente snippet e perché?:

using System;
 
class Foo
{
    public Foo(out Foo foo)
    {
        foo = this;
        throw new Exception();
    }
}
 
class Test
{
    static void Main()
    {
        Foo f = null;
        try { f = new Foo(out f); }
        catch { }
        Console.WriteLine(f == null ? "null" : "not null");
    }
}

Print | posted on venerdì 25 agosto 2006 13:20 | Filed Under [ Quiz Sharp ]

Powered by:
Powered By Subtext Powered By ASP.NET