What is difference b/w Generic List and Arraylist, Generic
List Vs HashTable, Generic List Vs No Generic? Pls Explain
with example.

Answers were Sorted based on User's Feedback



What is difference b/w Generic List and Arraylist, Generic List Vs HashTable, Generic List Vs No G..

Answer / debshankar bhattacharjee

Array List
1.Size/length of Array List can be increased or decreased
automatically.
2.Array list contains different types in the same array and
at the time of retrieving that value need to cast in
appropriate type.

Generic List:
Type of Generic list deceided at the time of compile and in
one generic list , we can include only any one type of
objects/value.
for example. if we write ,List<int> the this list can
contain only integer value.If we want to insert any string
then another list to be created.

Generic list is more efficient than arraylist

Is This Answer Correct ?    13 Yes 0 No

What is difference b/w Generic List and Arraylist, Generic List Vs HashTable, Generic List Vs No G..

Answer / mani

Array list can increase and decrease size dynamically.You
donot use the REDIM keyword. You can access any item in
array using the INDEX value of the array position.

You can access array using INDEX value of array. but how
many times you know the real value of INDEX . Hashtable
provides way of accessing index using user identified key
value,thu removing the INDEX problem.

Is This Answer Correct ?    6 Yes 9 No

Post New Answer

More ASP.NET Interview Questions

Explain the difference between webfarm and webgardens in .net?

0 Answers  


Can master pages be nested?

0 Answers  


What is difference between view state and session state?

0 Answers  


How to disable cut, copy and paste in TextBox using jQuery in asp.net?

0 Answers   HCL,


I create small website, i want accept all the browser this website? what will do?

1 Answers  






What are different types of authentication techniques that are used in connection strings to connect .net applications with microsoft sql server?

0 Answers  


Which is better asp.net or php?

0 Answers  


How u refer webservices?

0 Answers   Microsoft,


What do you understand by aggregate dependency?

0 Answers   MindCracker,


What language does asp.net use?

0 Answers  


Can we have a web application running without web.config file?

0 Answers  


When using the Pager object, inorder to know which page to go, which property you have to set to grid?

0 Answers   Siebel,


Categories