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 #61 [quiz a quattro mani]

Di seguito un quiz a quattro mani con Matteo Spreafico, risultato di un bellissimo e lunghissimo chat:

Cosa stampa a video questo snippet?

struct Foo
{
    public static implicit operator bool(Foo value)
    {
        return value != null;
    }
}

class Test
{
    static void Main()
    {
        if (new Foo())
        {
            System.Console.WriteLine("Ciao");
        }
    }
}

  • 1. niente
  • 2. Ciao
  • 3. non compila
  • 4. runtime exception

Print | posted on venerdì 9 marzo 2007 20:51 | Filed Under [ Quiz Sharp ]

Powered by:
Powered By Subtext Powered By ASP.NET