, .
, , Thread Safe ™:
void Add( something);
void Remove(index);
int GetCount();
something GetElementAt(index);
:
for 1 to 100 do
list.Add(12);
:
while( list.GetCount() >0)
{
list.Remove(0);
}
The code above will fail (sooner or later), because the list may change between the moment you call GetCountandRemove
source
share