what is difference between list and array?

0 abhishek sharma · October 4, 2016
Please help me ASAP?

Post a Reply


Oldest  Newest  Rating
0 M Jayanam · October 4, 2016
An array isn't dynamic, you define the boundaries one time. A List is a dynamic data structure for which you can easily add, remove or insert objects.
0 Emily Gagnon · October 22, 2016
use list<T> it is more versatile, you add remove content. array you need to specified size before using it. 

List<T> offers a lot more functionality than an array (although LINQ evens it up a bit), and is almost always the right choice. Except for params arguments, of course. ;-p

As a counter - List<T> is one-dimensional; where-as you have have rectangular (etc) arrays like int[,] or string[,,] - but there are other ways of modelling such data (if you need) in an object model.
  • 1



C# is an object-oriented language designed for improving the development of web applications.