Process.Exit C# (CSharp) Метод

Exit() защищенный Метод

protected Exit ( int aCode ) : void
aCode int
Результат void
    protected void Exit(int aCode)
    {
        Kernel32.ExitProcess(aCode);
    }

Usage Example

Пример #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