#include <xtd/collections/array_list>
#include <xtd/console>
#include <xtd/platform_id>
#include <xtd/time_span>
 
 
auto main() -> int {
  auto items = 
array_list {
true, 42, 
"This is a string", platform_id::win32s, u8
"Another string", 4.2f, 2_h + 25_min + 43_s};
 
  
  console::write_line("items = [{}]", string::join(", ", items));
  console::write_line("items = {}", items);
  console::write_line();
  
  for (auto item : items) {
    if (is<string>(item)) console::write_line("{}", as<string>(item).to_upper().quoted());
    else if (is<platform_id>(item)) console::write_line(
"{}::{}", 
typeof_(as<platform_id>(item)).name(), item);
 
    else console::write_line("{}", item);
  }
}
 
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:71
 
#define typeof_
Used to obtain the type object of a specified type or object.
Definition typeof.hpp:45
 
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:12
 
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10