.net - List<T> items order -


does generic list guarantee order of items when adding , iterating values?

if so, in definition of type or assumption on usual behavior?

updated:

it looks order kept now; there no trace of in official documentation, therefore assume might change in future , not in definition of list.

is there simple collection guarantees order? (excluding stack/queue specialized other uses)

it looks it's safe assumption.

although, critical applications (defence/finance), might worth using linkedlist or sub-classing list make future-proof in case new framework changes implementation.

the getenumerator return first element in list, there no written guarantee next element must second in list.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -