Click here to Skip to main content
15,902,112 members
Home / Discussions / C#
   

C#

 
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 
Thanks Muhammad,


Happy to learn new things from you. Two more comments,

1.

telha wrote:
Well MSDN states that Dictionary(Of TKey, of tValue) is a new class in v2.0. but further explains that the Objects used as Key are required to have an implementation of Equality Comparer, IEqualityComparer whereas in HashTable the objects used as Keys are required to override the IHashCode Provider interface or Object.GetHashCode method.


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?

2.

From, http://msdn.microsoft.com/en-us/library/xfhwa508(VS.80).aspx[^]

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?


regards,
George
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 
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 

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.