>So, what is the solution to the problem of removing item from collection while iterating through it if I don't want to start from last item?
>
>Update. I think if I will always remove the first item
>
>for lnI = 1 to Collection.Count
> oItem[1].Remove()
>next
>
>will work
It will work but usually you will have a conditional removal and then this code will not be useful (You could've use Remove(-1) to remove all items). You could always use a two pass procedure, in the first pass you determine the items you want to delete and store its keys in an auxiliary object (another collection, a cursor an array etc) then your second pass would be to scan that auxiliary object and use the keys to remove the items from the collection.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges