The thread 'The Name of my thread' (0xd88) has exited with code 0 (0x0).I added some debug/test code to the method that is running in the thread to print stuff to the console. Here is the code I added:
Console.WriteLine("Counter:"+Counter.ToString());
Now the text in the output window will be something like this:Counter:0 Counter:1 Counter:2 The thread 'The Name of my thread' (0xd88) has exited with code 0 (0x0). Counter:3The code is running fine and everything is OK, but why does the line Counter:3 show up after the thread has exited?