Possible Duplicate:
Why 3 threads for a basic single threaded c# console app?
Steps:
- Created a Console Application (c#) in .net.
Wrote the below 3-4 lines of code in Program.cs
class Program {
static void Main(string[] args) { HelloWorkd(); Console.Read(); } static void HelloWorkd() { Console.WriteLine("Hello World"); }
}
Build the project, in debug mode.
- Browsed to the .exe that is generated and start it.
- Started Task Manager, and had a look the process in which this exe is running. And it shows that 3 thread are running in this application!!!
Question: How come a simple program is showing three threads? I can accept 2 threads here, one for GC and other for my console, what is the third thread doing?
Thanks for your interest.