Alex Rivera | Logout

Is the order of objects returned by FOREACH stable?

Asked 2008-10-03T14:19:41.137
19

Is it safe to assume that two itterations over the same collection will return the objects in the same order? Obviously, it is assumed that the collection has not otherwise been changed.

Edit
Report

1 Answer

0

I would say that for most collection it is safe to assume this. It's not beyond the realms of possibility that a certain collection could have the enumerator implemented in a non-deterministic way, but that's probably not going to happen...

answered 2008-10-03T14:24:34.557

Your Answer