which is faster ArraytList Or Collection ? how?
hows the Hashing works internally ?

Answers were Sorted based on User's Feedback



which is faster ArraytList Or Collection ? how? hows the Hashing works internally ?..

Answer / ashutosh tripathi

Arraylist itself is a part of collection.
From a .NET perspective, a collection could be defined as
an object that implements one or more of the
System.Collections.ICollection,
System.Collections.IDictionary, and
System.Collections.IList interfaces.

This definition leads to my classification of the "built-
in" collections found in the System.Collections namespace
into three broad categories:
Ordered collections: Collections that implement only the
ICollection interface are usually distinguished by the fact
that insertion order controls the order in which objects
may be retrieved from the collection. The
System.Collections.Stack and System.Collections.Queue
classes are both examples of ICollection collections.
Indexed collections: IList-implementing collections are
distinguished by the fact that their contents can be
retrieved via a zero-based numeric index, like an array.
The System.Collections.ArrayList object is one example of
an indexed collection.
Keyed collections: Collections implementing the IDictionary
interface contain items that can be retrieved by an
associated key value of some kind. The contents of
IDictionary collections are also usually sorted in some
fashion based on the key valu and can be retrieved in
sorted order by enumeration. The
System.Collections.HashTable class implements the
IDictionary interface.

ArrayList

The System.Collections.ArrayList class, which implements
only IList, could best be described as a hybrid of a normal
array and a collection. ArrayLists hold items in the order
they were added. Items are assigned an index identifier and
can be retrieved in any order via their associated index
number. The ArrayList grows as new items are added to it,
which makes it more flexible than a normal array. However,
an ArrayList has more overhead than a traditional array and
is not strongly typed, accepting anything that can be cast
to System.Object (in other words, everything).

Is This Answer Correct ?    4 Yes 0 No

which is faster ArraytList Or Collection ? how? hows the Hashing works internally ?..

Answer / bathirasamy

l

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Hello, Using Visual Studio 2005 (VB) I am working to create a Web Site implementing the following: Within a gridView I have placed a dropdownlist control with a DataSourceID="SDSLkupList". SDSLkupList is a sqlDataSource used to store a lookup list for dropdownlist translation from ID to text. SDSLkupList contains the translation text and other fields related to the dropdown selection ID. (Thought it would be efficient to get everything at the same time.) I would like to provide the user the ability to select from the dropdownlist and, based on the selection, use labels to list related columns stored on the SDSLkupList in separate gridView columns. I have read that SqlDataSources are not meant to be used for individual controls. Since SDSLkupList contains all related information, is there a way to do a find using the dropdownlist selectedValue? (I was not able to discover one.) Otherwise, what should I use? It would need to set the labels on the gridView DataRowBound event as well as the SelectedIndexChanged events. Has anyone done this? Any help would be appreciated. Thanks in Advance. Neal

0 Answers  


How do you do client-side validation in .net? How to disable validator control by client side javascript?

0 Answers  


What are ASP.NET Web Forms? How is this technology different than what is available though ASP?

1 Answers   BirlaSoft,


is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?

0 Answers   eXensys,


Explain the difference between server control and html control.

0 Answers  






What is redirectpermanent in asp.net?

0 Answers  


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

6 Answers  


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

0 Answers   HCL,


what is <location> tag?

2 Answers  


Breifly explain about stack and heap memory Managemet?

2 Answers  


Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?

0 Answers  


What is authorization in asp.net?

0 Answers  


Categories