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 #72 [junior]

Il seguente snippet:

using System;

interface IFoo {
    IFoo GetInstance();
}

partial class Foo : IFoo {
    public IFoo GetInstance() {
        Console.WriteLine("Ciao");
        return this;
    }
}

class Program {
    static void Main() {
        (new Foo()).GetInstance().GetInstance();
    }
}

stampa:

Ciao
Ciao

a console. Senza toccare lo snippet ma solo aggiungendone un pezzo, dobbiamo stampare a console:

Ciao
UGIdotNET
Ciao

Print | posted on giovedì 21 maggio 2009 13:55 | Filed Under [ Quiz Sharp Test Sharp ]

Powered by:
Powered By Subtext Powered By ASP.NET