using System;
using System.Threading;
using System.Threading.Tasks;
public class Program
{
public static void Main()
int count = 0;
Parallel.For(0, 10000, i =>
count +=1; // not thread safe
});
Console.WriteLine(count);
}