Home  |  Delphi .net Home  |  System.Environment  |  Exit Method
  
Exit  
Method  
Terminates the current process, returning an code to the Operating System
Environment Class
System NameSpace
NotCF1.  Procedure Exit ( ExitCode : Integer ) ; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
Abruptly terminates the application (or more precisely, the current process), passing the ExitCode value to the Operating System.
Microsoft MSDN Links
System
System.Environment
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

begin
  Console.WriteLine('Press enter to terminate the application');
  Console.ReadLine;

  Environment.Exit(0);
end.
   Press enter to terminate the application
  
   [The application then terminates with no errors]
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author