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 #35 (Thibaut Barrère)

using System;
using System.Collections;

class Foo{
  static void Main()
  {
    Hashtable table = new Hashtable();
    int intKey = 50;
    long longKey = 50;
    table.Add(intKey, "SomeValue");
    table.Add(longKey, "SomeValue");
    Console.WriteLine(table.Count);
    Console.Read();
  }
}

Cosa viene visualizzato a console?

  • A. 1
  • B. 2
  • C. errore a run-time: System.ArgumentException, Item has already been added. Key in dictionary: "50" Key being added: "50"

Print | posted on domenica 22 agosto 2004 16:43 | Filed Under [ Quiz Sharp ]

Powered by:
Powered By Subtext Powered By ASP.NET