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

What is Cookies Less Session?

0 Answers  


Define a multilingual website?

0 Answers  


How many types of controls are there in asp.net?

0 Answers  


How can you send an email message from an asp.net web page?

0 Answers  


5. What three Specific Job Positions do you target from Swatz Oils GROUP U.K?

0 Answers   Swatz Oils,






What are the different types of proxy patterns?

0 Answers  


What layout mode is the default when a new Web Form is created? a) GridBagLayout b) GridLayout c) FlowLayout d) FormLayout

2 Answers   Syntax Softtech,


What is the use of @Register directives?

3 Answers  


How do I open an ashx file?

0 Answers  


How many languages are supported by .NET at present time?

0 Answers  


what is the deference between dataset and data adapter?

4 Answers   TCS,


Why would anyone need to implement their own hashtable or linked list?

0 Answers  


Categories