Im using a gmail class so that my app can send me notification over gmail.
Its done like this:
public static void SendMessage(string message)
{
N
The thread will go out of scope and be available for garbage collection as soon as SendFromGmail
finishes.
So yes, it closes automatically.
No need, it will return back to the thread pool and wait for other task, if none it will kill itself.
The thread needs to be started once - at which point it will execute the code block assigned to it and exit.
You don't need to explicitly clean up the thread in most cases (unless you want to bail out early for example )
Yes it will close, but you should but a timeout in order to avoid zombies anyway if the main thread crash while the second thread is waiting for it.
yes,definitely. it will close itself when it ends.
Yes , the thread is closed by itself.
That is when all instructions in the method run on the secodn thread have been called.