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 7

using System;

class Foo
{
  public static bool operator true(Foo f)
  {
    return false;
  }
  public static bool operator false(Foo f)
  {
    return true;
  }
}

class Bar
{
  static void Main()
  {
    if(new Foo())
    {
      Console.WriteLine("Hello world!");
    }
    else
    {
      Console.WriteLine("Ciao mondo!");
    }
    Console.ReadLine();
  }
}

Vi aspettate:

  • A. non compila
  • B. Hello world!
  • C. Ciao mondo!

Print | posted on lunedì 24 maggio 2004 00:15 | Filed Under [ Quiz Sharp ]

Powered by:
Powered By Subtext Powered By ASP.NET