COBCH1927 An AWAIT expression can only be used within an ASYNC method

The AWAIT expression has been used in a location outside of an ASYNC method.

Resolution:

Correct the code to place the AWAIT expression within an ASYNC method.

Example:

The following example shows an AWAIT expression used incorrectly outside of an ASYNC method:

      $set ilusing"System"
      $set ilusing "System.Threading.Tasks"
      $set sourceformat(variable)
       class-id A.
       method-id Main static.
               invoke await type Task::Delay(1000);
       end method.
       end class.