private static int counter = 0;
static void Main(string[] args)
var t1 = new Thread(IncrementCounter);
var t2 = new Thread(IncrementCounter);
Console.WriteLine($"Final Counter Value: {counter}");
static void IncrementCounter()
for (int i = 0; i < 100; i++)