Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: Hashtable v.s. Dictionary Pin
Guffa5-Jun-08 22:56
Guffa5-Jun-08 22:56 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George8-Jun-08 22:50
George_George8-Jun-08 22:50 
GeneralRe: Hashtable v.s. Dictionary Pin
Guffa9-Jun-08 1:18
Guffa9-Jun-08 1:18 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George9-Jun-08 1:27
George_George9-Jun-08 1:27 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George8-Jun-08 23:01
George_George8-Jun-08 23:01 
GeneralRe: Hashtable v.s. Dictionary Pin
Guffa9-Jun-08 6:28
Guffa9-Jun-08 6:28 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George9-Jun-08 17:05
George_George9-Jun-08 17:05 
GeneralRe: Hashtable v.s. Dictionary Pin
Guffa9-Jun-08 21:25
Guffa9-Jun-08 21:25 
George_George wrote:
If more then one elements falls into the same bucket (I think it means hashing conflicting), from your reply, it seems the elements of the same bucket is sorted using Comparer?


The elements are not sorted, they are just placed in buckets and the order in a bucket is not defined.

The comparer is always used when retrieving items. First the bucket is determined from the hash code, then the comparer is used to compare the desired key with the keys of the stored items (even if there is only one in the bucket).

George_George wrote:
From the Key type, we can implement the type from equality class, but how to assign the equality cmoparer for the Dictionary itself?


You can specify a comparer in the constructor to the dictionary. I actually wrote an article about that:

Dictionary with a Custom Key[^]

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Hashtable v.s. Dictionary Pin
George_George11-Jun-08 1:19
George_George11-Jun-08 1:19 
AnswerRe: Hashtable v.s. Dictionary Pin
Alan Balkany6-Jun-08 3:48
Alan Balkany6-Jun-08 3:48 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George8-Jun-08 22:51
George_George8-Jun-08 22:51 
GeneralRe: Hashtable v.s. Dictionary Pin
Alan Balkany9-Jun-08 3:11
Alan Balkany9-Jun-08 3:11 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George9-Jun-08 17:01
George_George9-Jun-08 17:01 
GeneralRe: Hashtable v.s. Dictionary Pin
Alan Balkany10-Jun-08 3:12
Alan Balkany10-Jun-08 3:12 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George11-Jun-08 1:22
George_George11-Jun-08 1:22 
GeneralRe: Hashtable v.s. Dictionary Pin
Alan Balkany11-Jun-08 3:23
Alan Balkany11-Jun-08 3:23 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George11-Jun-08 3:33
George_George11-Jun-08 3:33 
GeneralRe: Hashtable v.s. Dictionary Pin
Alan Balkany11-Jun-08 3:36
Alan Balkany11-Jun-08 3:36 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George11-Jun-08 16:40
George_George11-Jun-08 16:40 
GeneralRe: Hashtable v.s. Dictionary Pin
Alan Balkany12-Jun-08 3:07
Alan Balkany12-Jun-08 3:07 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George12-Jun-08 3:13
George_George12-Jun-08 3:13 
GeneralRe: Hashtable v.s. Dictionary Pin
Alan Balkany12-Jun-08 3:17
Alan Balkany12-Jun-08 3:17 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George12-Jun-08 23:26
George_George12-Jun-08 23:26 
GeneralRe: Hashtable v.s. Dictionary Pin
Alan Balkany13-Jun-08 3:14
Alan Balkany13-Jun-08 3:14 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George15-Jun-08 19:46
George_George15-Jun-08 19:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.