Shows how to use array_list alias.
#include <xtd/collections/array_list>
#include <xtd/console>
 
 
template<typename collection_t>
void print_values(const collection_t& my_list) {
  for (auto obj : my_list)
    console::write("   {0}", obj);
  console::write_line();
}
 
auto main() -> int {
  
  my_vl.emplace_back("World");
  my_vl.emplace_back("!");
  
  
  console::write_line("my_vl");
  console::write_line("    size:    {0}", my_vl.size());
  console::write_line("    Capacity: {0}", my_vl.capacity());
  console::write("    Values:");
  print_values(my_vl);
}
 
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:71
 
reference emplace_back(args_t &&... args)
Appends a new element to the end of the container. The element is constructed through std::allocator_...
Definition list.hpp:530
 
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