Abort 方法不會造成執行緒立即中止，因為目標執行緒可以攔截 ThreadAbortException 並執行 finally 區塊中任意數量的程式碼。The Abort method does not cause the thread to abort immediately, because the target thread can catch the ThreadAbortException and execute arbitrary amounts of code in a finally block. 如果您需要等候，直到執行緒結束，則可呼叫 Thread.JoinYou can call Thread.Join if you need to wait until the thread has ended. Thread.Join 是一個封鎖呼叫，在執行緒實際停止執行或已經過選擇性的逾時間隔之後才會返回。Thread.Join is a blocking call that does not return until the thread has actually stopped executing or an optional timeout interval has elapsed. 中止的執行緒可以呼叫 ResetAbort 方法，或在 finally 區塊中執行未繫結的處理，因此，如果您未指定逾時，則不保證會等候結束。The aborted thread could call the ResetAbort method or perform unbounded processing in a finally block, so if you do not specify a timeout, the wait is not guaranteed to end.

Try
' Code that is executing when the thread is aborted.
' Clean-up code can go here.
' If there is no Finally clause, ThreadAbortException is
' re-thrown by the system at the end of the Catch clause.
Finally
' Clean-up code can go here.
End Try
' Do not put clean-up code here, because the exception
' is rethrown at the end of the Finally clause.

try
{
// Code that is executing when the thread is aborted.
}
{
// Clean-up code can go here.
// If there is no Finally clause, ThreadAbortException is
// re-thrown by the system at the end of the Catch clause.
}
// Do not put clean-up code here, because the exception
// is rethrown at the end of the Finally clause.