Click here to Skip to main content
15,895,656 members
Home / Discussions / C#
   

C#

 
AnswerRe: Right tool for the job Pin
Rick van Woudenberg6-Sep-07 9:17
Rick van Woudenberg6-Sep-07 9:17 
QuestionHashtable vs Dictionary. Pin
nasambur6-Sep-07 2:06
nasambur6-Sep-07 2:06 
AnswerRe: Hashtable vs Dictionary. Pin
Sandeep Akhare6-Sep-07 2:12
Sandeep Akhare6-Sep-07 2:12 
AnswerRe: Hashtable vs Dictionary. Pin
Pete O'Hanlon6-Sep-07 2:49
mvePete O'Hanlon6-Sep-07 2:49 
AnswerRe: Hashtable vs Dictionary. Pin
Matthew Cuba6-Sep-07 4:47
Matthew Cuba6-Sep-07 4:47 
GeneralRe: Hashtable vs Dictionary. Pin
Jason Hanford-Smith6-Sep-07 7:13
Jason Hanford-Smith6-Sep-07 7:13 
GeneralRe: Hashtable vs Dictionary. Pin
Matthew Cuba6-Sep-07 7:32
Matthew Cuba6-Sep-07 7:32 
GeneralRe: Hashtable vs Dictionary. Pin
Jason Hanford-Smith6-Sep-07 7:43
Jason Hanford-Smith6-Sep-07 7:43 
If you take a look at the definition for Add and Item in Hashtable you'll see:

<br />
public virtual Object this[Object key]   <-- Item for you VB'ers<br />
public virtual void Add(Object key, Object value)<br />


Both getting from and adding to the Hashtable involves boxing or unboxing.

On the other hand, with Dictionary you have:

<br />
public TValue this[TKey key]              <-- Item for you VB'ers<br />
public void Add(TKey key, TValue value)<br />


As you can see, this uses Generics and so does not involve a type conversion or boxing/unboxing penalty.
GeneralRe: Hashtable vs Dictionary. Pin
Matthew Cuba6-Sep-07 7:53
Matthew Cuba6-Sep-07 7:53 
GeneralRe: Hashtable vs Dictionary. Pin
Jason Hanford-Smith6-Sep-07 9:12
Jason Hanford-Smith6-Sep-07 9:12 
GeneralRe: Hashtable vs Dictionary. Pin
Matthew Cuba6-Sep-07 9:18
Matthew Cuba6-Sep-07 9:18 
QuestionFlickering PictureBoxes in C# Pin
Ermak866-Sep-07 1:59
Ermak866-Sep-07 1:59 
AnswerRe: Flickering PictureBoxes in C# Pin
Christian Graus6-Sep-07 2:11
protectorChristian Graus6-Sep-07 2:11 
GeneralRe: Flickering PictureBoxes in C# Pin
Ermak866-Sep-07 2:14
Ermak866-Sep-07 2:14 
GeneralRe: Flickering PictureBoxes in C# Pin
Christian Graus6-Sep-07 2:39
protectorChristian Graus6-Sep-07 2:39 
QuestionCash for Help! Pin
MicealG6-Sep-07 1:42
MicealG6-Sep-07 1:42 
JokeRe: Cash for Help! Pin
Sandeep Akhare6-Sep-07 1:46
Sandeep Akhare6-Sep-07 1:46 
GeneralRe: Cash for Help! Pin
MicealG6-Sep-07 1:50
MicealG6-Sep-07 1:50 
GeneralRe: Cash for Help! [modified] Pin
Sandeep Akhare6-Sep-07 2:00
Sandeep Akhare6-Sep-07 2:00 
GeneralRe: Cash for Help! Pin
MicealG6-Sep-07 3:37
MicealG6-Sep-07 3:37 
AnswerRe: Cash for Help! Pin
Ravi Bhavnani6-Sep-07 1:54
professionalRavi Bhavnani6-Sep-07 1:54 
GeneralStill No Answer Pin
MicealG6-Sep-07 2:01
MicealG6-Sep-07 2:01 
AnswerRe: Cash for Help! Pin
J4amieC6-Sep-07 3:53
J4amieC6-Sep-07 3:53 
GeneralRe: Cash for Help! Pin
MicealG6-Sep-07 3:57
MicealG6-Sep-07 3:57 
GeneralRe: Cash for Help! Pin
J4amieC6-Sep-07 4:13
J4amieC6-Sep-07 4:13 

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.