.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

What is the difference between arraylist and array classes ?

Posted By :nishithraj     Posted Date :December 28, 2009    Points :10   Category :.NET Framework 
arraylist size can be dynamically increased where as array size can't be increased.

You can also find related Interview Question to What is the difference between arraylist and array classes ?  below: 

Difference between Array and ArrayList?

  
An array can contain only one data type ,where as an Array list can contain any data type in the form of object

Array cannot dynamically increase or decrease its size, where as Array list can (More...)

What is the difference between ARRAY and STACK?

  
STACK follows LIFO. Thus the item that is first entered would be the last removed.

In array the items can be entered or removed in any order. Basically each member access is done using index. No strict order is to be followed here to remove a particular element. (More...)

What's the difference between the System.Array.CopyTo() and System.Array.Clone() in c#?

  
The first one performs a deep copy of the array, the second one is shallow. (More...)

What's the difference between the System.Array.CopyTo() and System.Array.Clone()?

  
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object. (More...)

difference between Structs and classes

  
Structs are value types

All struct types implicitly inherit from the class System.ValueType

Assignment to a variable of a struct type creates a copy of the value being assigned

The default value of a struct is the value produced by setting all value type fields to their default value and all reference type fields to null

Boxing and unboxing operations are used to convert between a struct type and object

The meaning of this is different for structs

Instance field declarations for a struct are not permitted to include variable initializers

A struct is not permitted to declare a parameterless instance constructor

A struct is not permitted to declare a destructor (More...)

What's the difference between the System.Array.CopyTo() and System.Array.Clone()?

  
The first one performs a deep copy of the array, the second one is shallow. (More...)

What are the similarities between an array and an ArrayList?

  
The following are the similarities between an array and an ArrayList:

- Both array and ArrayList can have duplicate elements in them.
- Both are unordered lists.
- Both uses index to refer to their elements.
- Both supports null values (More...)

What is the difference between Array List and Array?

  
Array List:
1] Array List belongs to System.Collection namespace.
2] Size of the array can be increase and decrease
3] Can contain different types of data.


Arrya:
1] Array belongs to System namespace.
2] Size is fixed.
3] Can contain only one type of value. (More...)

What is the difference between MSML and .NET
Framework XML classes?

  
MSXML supports XMLDOM and SAX parsers while .NET framework XML classes
support XML DOM and XML readers and writers.

MSXML supports asynchronous loading and validation while parsing. For example you can send synchronous and asynchronous calls to a remote URL. But as such there is not direct support of synchronous and asynchronous calls in .NET framework XML. But it can be achieved by using "System.Net" namespaces. (More...)

What's difference between HashTable and ArrayList ?

  
Array can be accessed using INDEX value. Hashtable provides way of accessing the index using a KEY value, thus removing the INDEX problem. (More...)

Difference between System.String and System.StringBuilder classes?

  
-- System.String is immutable; System.StringBuilder can have mutable string where a variety of operations can be performed. (More...)

Difference between the System.Array.CopyTo() and System.Array.Clone()?

  
System.Array.CopyTo() : Deep a Copy of the Array
System.Array.Clone(): shallow (More...)

What is the difference between the Array.Clone() and Array.CopyTo() ?

  
Array.Clone -- method returns a new array object containing all the elements in the original array.
Array.CopyTo -- method copies the elements into another existing array. (More...)

What is the difference between the System.Array.CopyTo() and System.Array.Clone()?

  
Clone() : method returns a new array (a shallow copy) object containing all the elements in the original array.
CopyTo() : method copies the elements into another existing array.

Both perform a shallow copy.

A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array.

A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend