When Microsoft® Repository establishes an enumerator for you, it reads the Repository database to determine which items should appear in the list, and the order in which those items should appear. The enumerator does not, however, contain repository items. Rather, each element of an enumerator identifies a repository item. To retrieve a particular item identified by the next element of an enumerator, use the Next method of the enumerator interface.
The elements in an enumerator identify the items in a collection as described by the Repository database when the enumerator was instantiated. After you instantiate the enumerator, the collection in the database can change. Specifically, the collection can change in these ways:
Your enumerator will not refer to the newly added item. To see the new item, you must instantiate the enumerator again.
Your enumerator will continue to refer to the deleted item. That is, your enumerator will retain an element that refers to the deleted item by its internal identifier. When you call the Next method to retrieve the item, the method returns an error.
Your enumerator will reflect the old order. To see the new order, you must reinstantiate the enumerator.