I'm facing a problem and can't work it arround.
Iterating through the messages queue , I wanna resend or delete some of them, but as soon as I try to remove the current message, it removes the message but my iteration exits and the program continues.
MessageEnumerator enumerator = queue.GetMessageEnumerator2();
while (enumerator.MoveNext())
{
//Check some stuff to resend or remove
enumerator.RemoveCurrent();
}
Why it does not keep on iterating through the rest of messages availables in the queue?
Thanks.