Hello World Program in X++ Programming Language

Rumman Ansari   Software Engineer   2023-09-01   1297 Share
☰ Table of Contents

Table of Content:


Hello World in X++ Programming Language

In the X++ programming language, used primarily for Microsoft Dynamics AX (now known as Dynamics 365 Finance and Operations), you can create a "Hello, World!" program as follows:


class HelloWorld{
    public static void main (Args _args)
    {
        info("Hello, World!");
    }
}

In this code:

  1. public static void main (Args _args) defines a static method named "main " that takes an argument of type "Args" (which is a common placeholder for command-line arguments, though not used in this example).

  2. info("Hello, World!"); is a built-in X++ function that displays the given message in an information dialog box.

To run this code, you would typically create a new job in the AX/D365 development environment, paste the code into the job, and then execute the job. The output "Hello, World!" will be displayed in an information dialog box.