sureshhs
August 29th, 2002, 08:43 PM
I want to delete an object in ArrayList Collection. I'm using iEnumerator to find the object I want like to delete. After deletion an exception is thrown for next operation of IEnumerator. I found this description in MSDN help. Any suggestions to overcome this problem.
-------------------------------------------------------------------------------
An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to MoveNext or Reset throws an InvalidOperationException.
------------------------------------------------------------------------------
Any Advice.
Thanks
Suresh
-------------------------------------------------------------------------------
An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to MoveNext or Reset throws an InvalidOperationException.
------------------------------------------------------------------------------
Any Advice.
Thanks
Suresh