using System.Threading;
public class Program
{
static int count = 0;
public static void Main()
Thread thread1 = new Thread(Increment);
Thread thread2 = new Thread(Increment);
thread1.Start();
thread2.Start();
}
public static void Increment()
for(int i = 0; i < 10000; i++)
Interlocked.Increment(ref count);
Console.WriteLine(count);