This example simplifies this code by instantiating the xtd::action delegate instead of explicitly defining a new delegate and assigning a named method to it.
#include <xtd/action>
#include <xtd/console>
#include <xtd/environment>
#include <xtd/forms/message_box>
auto main()->int {
if (environment::get_command_line_args().
size() > 1)
else
message_target("Hello, World!");
}
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
size_t size
Represents a size of any object in bytes.
Definition types.h:197
delegate< void(arguments_t...)> action
Represents a xtd::delegate that has variable parameters and does not return a value.
Definition action.h:18
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10