Pages

Men

rh

6/16/2012

Difference between Array and ArrayList


Array :
  • Array is strongly typed. Means it can contain only one data type of elements.
  • Array size is fixed.
  • Boxing and unboxing will not happen.
  • Runtime errors can be prevented because boxing and unboxing will not happen.
  • It is available in Systems name space.
  • We cannot delete elements from Array.
Array List
  • Array list can contain different data types of elements.
  • Array list size is not fixed. It can grow automatically.
  • Boxing and unboxing will happen
  • Can get a chance of run time errors.
  • It is available in System.Collections name space.
  • We can delete elements from Array List.

No comments :

Post a Comment