TerminateThread() public static method

Terminates a thread.
public static TerminateThread ( SafeMemoryHandle threadHandle, int exitCode ) : void
threadHandle Binarysharp.MemoryManagement.Native.SafeMemoryHandle A handle to the thread to be terminated.
exitCode int The exit code for the thread.
return void
 /// <summary>
 ///     Terminates the thread.
 /// </summary>
 /// <param name="exitCode">The exit code of the thread to close.</param>
 public void Terminate(int exitCode = 0)
 {
     if (IsAlive)
     {
         ThreadCore.TerminateThread(Handle, exitCode);
     }
 }