Does the List in .NET work the same way as arraylist in Java?

Posted by eflles on Stack Overflow See other posts from Stack Overflow or by eflles
Published on 2010-03-19T10:33:53Z Indexed on 2010/03/19 10:41 UTC
Read the original article Hit count: 158

Filed under:
|
|
|

When I learned Java, I was told that the arraylist works this way:

  • It creates an array with room for 10 elements.

  • When the 11th element is added, it is created a new list with room for 20 elements, and the 10 elements are copied into the new array. This will repeat as until there are no more elements to add, or to a maximum size.

Is the List in .NET constructed the same way?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about java