Click here to Skip to main content
15,906,329 members
Home / Discussions / C#
   

C#

 
QuestionCannot insert duplicate key row in object Pin
Ballita5-Jun-08 18:54
Ballita5-Jun-08 18:54 
AnswerRe: Cannot insert duplicate key row in object Pin
dealon5-Jun-08 20:25
dealon5-Jun-08 20:25 
AnswerRe: Cannot insert duplicate key row in object - DUPLICATE POST Pin
Ashfield5-Jun-08 21:09
Ashfield5-Jun-08 21:09 
QuestionHashtable v.s. Dictionary Pin
George_George5-Jun-08 16:56
George_George5-Jun-08 16:56 
AnswerRe: Hashtable v.s. Dictionary Pin
PIEBALDconsult5-Jun-08 16:58
mvePIEBALDconsult5-Jun-08 16:58 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George5-Jun-08 17:00
George_George5-Jun-08 17:00 
GeneralRe: Hashtable v.s. Dictionary Pin
Francofu5-Jun-08 17:08
Francofu5-Jun-08 17:08 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George5-Jun-08 18:25
George_George5-Jun-08 18:25 
GeneralRe: Hashtable v.s. Dictionary Pin
PIEBALDconsult5-Jun-08 17:29
mvePIEBALDconsult5-Jun-08 17:29 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George5-Jun-08 18:24
George_George5-Jun-08 18:24 
AnswerRe: Hashtable v.s. Dictionary Pin
telha5-Jun-08 20:23
telha5-Jun-08 20:23 
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 

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.