what is the mistake in my code? i used "Parallel For"

Nov 13 2016 11:06 AM
List<int> points = new List<int>();
Parallel.For(0, 15000000, i =>
{
points.Add(i);
});
 
this is my code. The mistake is "An exception of type 'System.ArgumentException' occurred in mscorlib.dll but was not handled in user code" Solutions? 

Answers (1)