Friday, August 23, 2013

List vs Array

List vs Array

List is dynamic size and array is fixed size.

If You can add new elements to a list, but to add a new element to an array you need to create a new larger array and copy the old elements.
Arrays are a little leaner and more efficient if you don't need dynamic resizing, but lists are usually more convenient and the performance difference rarely matters for most applications.

For more information. 

No comments:

Post a Comment