Question d’entretien chez Logicalis

diff bet hashtable and dictionary

Réponses aux questions d'entretien

Utilisateur anonyme

17 déc. 2009

no box -unbox in dictionary

Utilisateur anonyme

10 sept. 2012

The generic dictionary is implemented as a hashtable, too. It is obviously generic and type-safe, hashtable is non-generic. Other non-generic dictionaries always have subtle differences: SortedList is sorted automatically; StringDictionary stores trings; ListDictionary is optimised for collections <10 elements; HybridDictionary behaves like a ListDictionary when small, and like a Hashtable when bigger; NameValueCollection can also be accessed by index.