Shows how to use xtd::version to get the Operating System version.
#include <xtd/console>
#include <xtd/environment>
#include <xtd/startup>
 
 
namespace version_os_example {
  class program {
  public:
    
    static auto main() {
      
      auto os = environment::os_version();
      auto ver = os.version();
      console::write_line("Operating System: {0} ({1})", os.version_string(), ver.to_string());
    }
  };
}
 
startup_(version_os_example::program::main);
 
 
#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