for (int j = 0; j < list.Count; ++j )
{
if (list[j].current_status == false)
{
list.RemoveAt(j);
}
}
I want to remove all the items which has current_status == false in the list, However, When execute the statement: list.RemoveAt(j), the list.Count will minus one. Finally, the original loop can not be looped from list[0] to list[list.Count]. How can I deal with this situation?
Thanks