Click here to Skip to main content
15,907,000 members
Home / Discussions / C#
   

C#

 
GeneralRe: XQuery Pin
George_George5-Jun-08 22:30
George_George5-Jun-08 22:30 
Questioninfragistics Ultragrid Pin
Member 31169975-Jun-08 20:30
Member 31169975-Jun-08 20:30 
AnswerRe: infragistics Ultragrid Pin
Pete O'Hanlon5-Jun-08 22:07
mvePete O'Hanlon5-Jun-08 22:07 
GeneralRe: infragistics Ultragrid Pin
Colin Angus Mackay5-Jun-08 22:48
Colin Angus Mackay5-Jun-08 22:48 
GeneralRe: infragistics Ultragrid Pin
Pete O'Hanlon6-Jun-08 1:12
mvePete O'Hanlon6-Jun-08 1:12 
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 
George_George wrote:
I did some search from MSDN, I think Dictionary is using either IEqualityComparer.Equals or System.IEquatable, while Hashtable is using Object.GetHashCode to check whether two keys' are the same?


Both the HashTable and the Dictionary uses both the GetHashCode method and some kind of comparer. The hash code is used to determine a bucket for the item, and the comparer is used when looping through the items in the bucket to find the correct item.

HashTable uses the Equals method if no customer key comparer is specified. Dictionary uses the default EqualityComparer for the key if no custom key comparer is specified.

George_George wrote:
What means "Every key in a Dictionary must be unique according to the dictionary's equality comparer" -- I understand key in a Dictionary should have an equality comparer, but I do not know what means an equality comparer for a Dictionary itself?


That's the same thing. The equality comparer for the dictionary is only used to compare keys.

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

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 
GeneralRe: Hashtable v.s. Dictionary Pin
George_George11-Jun-08 1:19
George_George11-Jun-08 1:19 

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.