Check out example codes for "c# best way to loop and remove". It will help you in understanding the concepts better.

Code Example 1

for (int i = safePendingList.Count - 1; i >= 0; i--)
{
    // some code
    // safePendingList.RemoveAt(i);
}

Learn ReactJs, React Native from akashmittal.com