Why doesn't my process terminate even after main thread terminated

Sometimes you may wonder why your .NET application didn't terminated even after the main thread is terminated. Infact I was boggled with this problem for some time.
Finally I figured out that .NET does not terminates a process on the termination of main thread if there are other threads running. The new definition for determining process abortion is as follows:
"Once all foreground threads belonging to a process have terminated, the common language runtime ends the process by invoking 'Abort' on any background threads that are still alive"

This means that if you want your application to exhibit the same behavior (as I was expecting [:)]), make sure that you set all the threads background property to true (except for main thread). For complete details on this thread property, follow https://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemthreadingthreadclassisbackgroundtopic.asp