126.96.36.199 Delegate invocations
For a delegate invocation, the primary-expression of the invocation-expression must be a value of a delegate-type. Furthermore, considering the delegate-type to be a function member with the same parameter list as the delegate-type, the delegate-type must be applicable (Section 188.8.131.52) with respect to the argument-list of the invocation-expression.
The run-time processing of a delegate invocation of the form
D is a primary-expression of a delegate-type and
A is an optional argument-list, consists of the following steps:
Dis evaluated. If this evaluation causes an exception, no further steps are executed.
- The value of
Dis checked to be valid. If the value of
System.NullReferenceExceptionis thrown and no further steps are executed.
Dis a reference to a delegate instance. Function member invocations (Section 7.4.3) are performed on each of the callable entities in the invocation list of the delegate. For callable entities consisting of an instance and instance method, the instance for the invocation is the instance contained in the callable entity.