Shows how to use xtd::delegate::begin_invoke, xtd::delegate::end_invoke and xtd::delegate::invoke methods.
#include <xtd/threading/thread>
#include <xtd/console>
#include <xtd/delegate>
auto main() -> int {
auto d1 = delegate<int(
const string&)> {[](
const string& name) ->
int {
return name == "xtd" ? 42 : 24;
}};
auto result =
d1.begin_invoke(
"Gammasoft");
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
static thread & current_thread() noexcept
Gets the currently running thread.
@ d1
The 1 key.
Definition console_key.hpp:70
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:11
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8