I currently have 4 Timers adding objects to a List
but as soon as they get out of the WinForms Control they should be deleted.
I've Tried this :
foreach (Auto a in autoListe)
{
if (a.X > 550 || a.X < -50 || a.Y > 550 || a.Y < -50)
{
autoListe.Remove(a);
}
}
But when an Object
leaves the Control this gives out an Exception
due to the List
being used to add Car
s at the same time.
So now I'm not sure how to remove Object
since the adding of the Object
s needs to be constant