a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
6 lines
1.7 KiB
XML
6 lines
1.7 KiB
XML
<?xml version="1.0"?>
|
|
<clause number="14.5.5.2" title="Delegate invocations">
|
|
<paragraph>For a delegate invocation, the <non_terminal where="14.5">primary-expression</non_terminal> of the <non_terminal where="14.5.5">invocation-expression</non_terminal> must be a value of a <non_terminal where="11.2">delegate-type</non_terminal>. Furthermore, considering the <non_terminal where="11.2">delegate-type</non_terminal> to be a function member with the same parameter list as the <non_terminal where="11.2">delegate-type</non_terminal>, the <non_terminal where="11.2">delegate-type</non_terminal> must be applicable (<hyperlink>14.4.2.1</hyperlink>) with respect to the <non_terminal where="14.4.1">argument-list</non_terminal> of the <non_terminal where="14.5.5">invocation-expression</non_terminal>. </paragraph>
|
|
<paragraph>The run-time processing of a delegate invocation of the form D(A), where D is a <non_terminal where="14.5">primary-expression</non_terminal> of a <non_terminal where="11.2">delegate-type</non_terminal> and A is an optional <non_terminal where="14.4.1">argument-list</non_terminal>, consists of the following steps: <list><list_item> D is evaluated. If this evaluation causes an exception, no further steps are executed. </list_item><list_item> The value of D is checked to be valid. If the value of D is null, a System.NullReferenceException is thrown and no further steps are executed. </list_item><list_item> Otherwise, D is a reference to a delegate instance. A function member invocation (<hyperlink>14.4.3</hyperlink>) is performed on the method referenced by the delegate. If the method is an instance method, the instance of the invocation becomes the instance referenced by the delegate. </list_item></list></paragraph>
|
|
</clause>
|