I am iterating through all the list in mainlist and if a specific condition occur. I want to remove that specific list.
It is not working.
for (int i = 0; i < mainList.Count; i++)
{
if (mainList[i].Dead == true) //
{
mainList.removeAt(i);//what will be affect on mainList.Count;
}
}