NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

10.3 Invocation expressions

An invocation expression consists of an invocation target, followed by an open parenthesis, followed by an optional argument list, and followed by a close parenthesis. If there are no arguments, the parenthesis may be omitted. The invocation target must either be:

Given a set of one or more methods referred to by an invocation target, overload resolution is applied to pick a single method applicable to the given argument list. If no method is applicable, an error occurs. The value of an invocation expression is the value returned from the method. The method must be a function unless the invocation expression is the argument to an invocation statement.

At runtime, the argument list will be evaluated first, then the invocation target expression. If the invocation target expression references a shared method, the expression will not be evaluated as it is unnecessary.

InvocationExpression ::= InvocationTargetExpression [ ( [ ArgumentList ] ) ]
InvocationTargetExpression ::=
 DelegateExpression |
 [ [ Expression ] . ] IdentifierOrKeyword |
 MyClass . IdentifierOrKeyword |
 MyBase . IdentifierOrKeyword |
 MethodMemberName
DelegateExpression ::= Expression