How to use Method Calls

A Method Call is a block of code containing statements. The statements in that block – the method – will be executed by calling the method and specifying any required method arguments.

See also Methods for explanations of the basics and for Code examples and for the declaration of Method Calls

Using a Method Call

Once a Method Call has been declared (defined, programmed in the AI-Framework), it can be used in several ways.

In the Code Examples, we assume the existence of the method: ShowCountryCodes().

Within the Operation

If the method ShowCountryCodes() is defined in the current Operation, this Method Call can be used anywhere within this Operation.

...
    ShowCountryCodes(),
...

Within a Form related to the Operation

If the method ShowCountryCodes() is defined in the an Operation that is related to the Form, it can be used anywhere within this Form. The call needs to be preceded with Operation..

...
    Operation.ShowCountryCodes(),
...

 

 

List of Articles

Articles on the left show how to use different types of Method Calls.
There are also a number of Complex Method Calls. These articles are listed on the right.

 

Method Calls Complex Method Calls
  See Complex Method Calls 

 

Note:

The Complex Method Calls shows Lists and Arrays.

  • A List leverages generics. it is essentially a type-safe list of objects. You can add and remove items from it and it automatically deals with allocating space.
  • An Array is fixed in size once it is allocated. You can't add items to it or remove items from it. The elements must be the same type.

See also Lists and Arrays