Here is the code
List<string> something = new List<string>();
Parallel.ForEach(anotherList, r =>
{
.. do some work
something.Add(somedata);
});
I get the Index out of bounds error around 1 time per hundred run. Is there anyway to prevent the conflict (I assume) caused by threading?