environmentexitcode

June 30, 2026 ยท View on GitHub

Shows how to use xtd::environment::exit_code method.

Sources

Build and run

Open "Command Prompt" or "Terminal". Navigate to the folder that contains the project and type the following:

xtdc run

Output

>environment_exit_code
>Program ended with exit code: 89

>environment_exit_code xtd
>Program ended with exit code: 22

>environment_exit_code 2147483648
>Program ended with exit code: 34

>environment_exit_code 2142
Result: 4284
>Program ended with exit code: 0