which is better arraylist or dictionary?

Answer Posted / lavanya

arraylist accepts any type of object. when we create an
arraylist it allows duplicate values.
in dictionary it maintains key and value which is specific
type (i.e, either its int or string or any datatype)
it will not allow duplicates.
so dictionary is better in some requirements.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is event bubbling?

578


What is the use of ASP.NET routing?

562


How to turn off cookies for a page?

583


Why mvc is better than asp.net? : Asp.Net MVC

473


Write a code for sending an email from asp.net application.

540






Why select Web API?

569


Can we handle the error and redirect to some pages using web.config?

924


Explain model, view and controller represent in an mvc application? : asp.net mvc

519


What is difference between asp.net and asp?

566


How about the security in Activex DLL and Activex EXE ?

1789


What is mvc in asp.net tutorial? : Asp.Net MVC

547


What is postback pixel?

523


What are the Types of chaching. How to implement caching

564


What are url fragments?

508


What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?

586