2
Reply

What is differnce between Array,Collection and List. ?

Sandeep Kumar

Sandeep Kumar

9y
515
0
Reply

    List are generics and constructed types and size manage is done automatically so ideal for linear collections. ex. List myIntegerList = new List (); myIntegerList.Add(1); myIntegerList.Add(2);Array do not resize dynamically and a set of sequential memory locations. Refer Arrays in C#

    Array:Array is group of homogeneous data type object.The size of Array is fixed and array is strong data type. int[]A=new int[6]{1,2,3,4,5,6} Collection: Collection is group of heterogeneous data type object.The size of collection is not fixed and it contains the generic data type. Collection=new Collection{Ram,Shyam} List:List is Group of data type object list=new list where t is data type