What is the difference between Hash Table and Arrays?

Answer Posted / amit singh

Hashtable is not type safe while array is.
Boxing takes place while u store value in hastable.Because
hastable stores data as objects and when u retreive value
then unboxing takes plase.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the Types of JIT and what is econo-JIT

800


Could you explain the difference between func vs action vs predicate?

461


Explain briefly the difference between value type and reference type?

558


What does an indexer do?

480


Classes and structs can be declared as static, is this statement true or false?

553






What are the different types of constructors?

510


Can you have parameters for static constructors?

541


Explain hash table in c# ?

662


What is the difference between method and constructor in c#?

460


What is a hash table c#?

472


What is use of abstract class in c#?

497


These questions were asked me in a technical interview: •If we deploy an application on multiple server (like database server, web server) then, each request should be redirected to proper server, then how you will handle it in your code? •How security pinholes will be handled in an application? •What things should be considered while writing a web application? •How will you do load/performance testing of web application? Which framework you will use for it? •How will you implement a cache for results which require a DB access? Please let me know how to write an web application considering all these points. I am not so much aware of architechural design of web application. Your guidelines will be helpful.

2507


Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?

526


Can I get the name of a type at runtime?

536


What is lazy loading and eager loading in c#?

486