Process.Exit C# (CSharp) Method

Exit() protected method

protected Exit ( int aCode ) : void
aCode int
return void
    protected void Exit(int aCode)
    {
        Kernel32.ExitProcess(aCode);
    }

Usage Example

Exemplo n.º 1
0
 protected override void OnStop()
 {
     lock (_lock)
     {
         if (!IsRunning)
         {
             return;
         }
         IsRunning = false;
     }
     Debug.WriteLine($"Service [{ServiceName}] stopped");
     try
     {
         _shouldRestart = false;
         _process.Exit();
     }
     catch (Exception exception)
     {
         Debug.WriteLine(exception);
     }
 }
All Usage Examples Of Process::Exit