Mohan Gupta
What is difference between an Array and ArrayList?
By Mohan Gupta in C# on Jun 13 2013
  • PAUL K
    Aug, 2014 15

    ARRAY:-Generally we will declare arrays with fixed length.Arrays are strongly typed collection of same datatype and these arrays are fixed length that cannot be changed during run time. If we want to access values from arrays we need to pass index values.Ex. string[] arr=new string[2];arr[0]="zero";arr[1]="one";ARRAYTLIST:-Array lists are not strongly type collection. It will store values of different datatypes or same datatype. Array list size will increase or decrease dynamically it can take any size of values from any data type. These Array lists will be accessible with “System.Collections” namespace.Ex:- ArrayList objstr = new ArrayList();objstr.Add("welcome"); // Add string valuesobjstr.Add(10); // Add integer valuesobjstr.Add(10.05);// Add float values

    • 0
  • Pavan Ramamurthy
    Aug, 2013 29

    Array: -Size is Fixed, can;t change @ runtime -It's Collectio Of Same data-types ArrayList: -Size can't be Altered @ runtime as well as design time -It's collection of different datatypes

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS