What is the main difference between hash table and Dictionary?
Answers were Sorted based on User's Feedback
Answer / lakshmi maddala
Dictionary and Hash table are collection of data structure to hold data as key/value pairs.
Dictionary is generic type, hash table is not
We can't use dictionary with web services.
In .NET hash table is thread safe for use by multiple reader thread and a single writing thread, while in dictionary public static members are thread safe, but any instance members are not guaranteed to be thread safe.
Is This Answer Correct ? | 15 Yes | 2 No |
Answer / mehdi
Dictionary is a generic type, Hashtable is not. That means
you get type safety with Dictionary, because you can't
insert any random object into it, and you don't have to
cast the values you take out.
Is This Answer Correct ? | 15 Yes | 3 No |
Answer / sunil kumar
Dictionary is a generic type, Hashtable is not. Now what that
means.You get type safety with Dictionary, because you can't
insert any random object into it, and you don't have to cast
the values you take out.
And also generic collections are a lot faster as there's no
boxing/unboxing
Again Hashtable also have to box/unbox, which may have memory
consumption as well as performance penalties.
Is This Answer Correct ? | 7 Yes | 1 No |
How to fetch a data from one table to another table in asp.net ?
What are the two types of web pages?
what to magage the state manament in asp.net with respect to in_prock and out_prock
How many classes can a single .NET DLL contain?
How do u optimize a query in asp.net?
Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ?
Hi please tell me what is ISNOTPOSTBACK,POSTBACK,AUTOPOSTBACK and also the extensions of aspx,asmx,ascx its urgent plz reply me soon....
Define a web service in .net?
i have one gridview contains edititemtemplate(which contains update and cancel buttons) and i have one item template (contains edit button) i want the code for update and cancelbuttons in edit item template and i want the code for edit button in itemtemplate. please help me
Explain the main function of razor in asp.net? : asp.net mvc
What is a server farm in iis?
You are using the try? catch block seen in the following code segment, but no exceptions are ever caught by the catch block. What is the problem? SqlConnection cn =new sqlConnection(strSQL); SqlDataSet ds; try { cn.open(); //perform the data processing steps ??.. } catch (OleDbException e) { ?.. } a) The exception class is wrong; it should be sqlErrors. b) The exception class is wrong; it should be sqlSyntaxExceptios. c) The exception class is wrong; it should be sqlExceptions. d) The exception class is wrong; it should be sqlExcptions.
2 Answers Microsoft, Syntax Softtech,