Demonstrates the xtd::version constructor, and major, minor, build, revision, major_revision, and minor_revision properties.
#include <xtd/console>
#include <xtd/startup>
#include <xtd/version>
 
 
namespace version_example {
  class program {
  public:
    
    static auto main() {
      auto fmt_std = "Standard version:\n"
        "  major.minor.build.revision = {0}.{1}.{2}.{3}";
      auto fmt_int = "Interim version:\n"
        "  major.minor.build.maj_rev/min_rev = {0}.{1}.{2}.{3}/{4}";
        
      auto std = 
version {2, 4, 1128, 2};
 
      auto interim = 
version {2, 4, 1128, (100 << 16) + 2};
 
      
      console::write_line(fmt_std, std.major(), std.minor(), std.build(), std.revision());
      console::write_line(fmt_int, interim.major(), interim.minor(), interim.build(), interim.major_revision(), interim.minor_revision());
    }
  };
}
 
startup_(version_example::program::main);
 
 
 
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition version.hpp:114
 
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:175
 
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10