Shows how to use xtd::action alias.
#include <xtd/collections/generic/list>
#include <xtd/action>
#include <xtd/console>
#include <algorithm>
auto main() -> int {
auto names =
list {
"Bruce",
"Alfred",
"Tim",
"Richard"};
console::write_line(value);
}};
std::for_each(names.begin(), names.end(), print);
std::for_each(names.begin(), names.end(), [](const string & value) {
console::write_line(value);
});
}
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.h:71
delegate< void(arguments_t...)> action
Represents a xtd::delegate that has variable parameters and does not return a value.
Definition action.h:20
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.h:15
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10