I think you want to iterate a container and remove along the way? A common way is to just iterate backwards:
for(int i=myContainer.Length-1; i>=0; i--)
{
if(something)
{
myContainer.RemoveAt(i);
}
}
I think you want to iterate a container and remove along the way? A common way is to just iterate backwards:
for(int i=myContainer.Length-1; i>=0; i--)
{
if(something)
{
myContainer.RemoveAt(i);
}
}