Shows how to use xtd::environment::exit method.
#include <xtd/console>
#include <xtd/environment>
#include <xtd/startup>
namespace environment_exit_code_example {
class program {
public:
console::write_line(
"Before environment::exit(exit_status::{})",
exit_status);
console::write_line(
"After environment::exit(exit_status::{})",
exit_status);
}
};
}
startup_(environment_exit_code_example::program::main);
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:71
virtual size_type size() const noexcept
Returns the number of elements in the container, i.e. std::distance(xtd::collections::generic::list::...
Definition list.hpp:364
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:175
exit_status
Specifies exit status for the xtd::environment::exit method.
Definition exit_status.hpp:18
@ failure
Unsuccessful execution of a program. Is equal to EXIT_FAILURE.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10