disable broken tests on net_4_0
[mcs.git] / docs / ecma334 / 14.5.5.xml
blob7b027ece32824415ea0d5c803744e4bb08ec9c0c
1 <?xml version="1.0"?>
2 <clause number="14.5.5" title="Invocation expressions">
3   <paragraph>An <non_terminal where="14.5.5">invocation-expression</non_terminal> is used to invoke a method. <grammar_production><name><non_terminal where="14.5.5">invocation-expression</non_terminal></name> : <rhs><non_terminal where="14.5">primary-expression</non_terminal><terminal>(</terminal><non_terminal where="14.4.1">argument-list</non_terminal><opt/><terminal>)</terminal></rhs></grammar_production></paragraph>
4   <paragraph>The <non_terminal where="14.5">primary-expression</non_terminal> of an <non_terminal where="14.5.5">invocation-expression</non_terminal> must be a method group or a value of a <non_terminal where="11.2">delegate-type</non_terminal>. If the <non_terminal where="14.5">primary-expression</non_terminal> is a method group, the <non_terminal where="14.5.5">invocation-expression</non_terminal> is a method invocation (<hyperlink>14.5.5.1</hyperlink>). If the <non_terminal where="14.5">primary-expression</non_terminal> is a value of a <non_terminal where="11.2">delegate-type</non_terminal>, the <non_terminal where="14.5.5">invocation-expression</non_terminal> is a delegate invocation (<hyperlink>14.5.5.2</hyperlink>). If the <non_terminal where="14.5">primary-expression</non_terminal> is neither a method group nor a value of a <non_terminal where="11.2">delegate-type</non_terminal>, a  compile-time error occurs. </paragraph>
5   <paragraph>The optional <non_terminal where="14.4.1">argument-list</non_terminal> (<hyperlink>14.4.1</hyperlink>) provides values or variable references for the parameters of the method. </paragraph>
6   <paragraph>The result of evaluating an <non_terminal where="14.5.5">invocation-expression</non_terminal> is classified as follows: <list><list_item> If the <non_terminal where="14.5.5">invocation-expression</non_terminal> invokes a method or delegate that returns <keyword>void</keyword>, the result is nothing. An expression that is classified as nothing cannot be an operand of any operator, and is permitted only in the context of a <non_terminal where="15.6">statement-expression</non_terminal> (<hyperlink>15.6</hyperlink>). </list_item><list_item> Otherwise, the result is a value of the type returned by the method or delegate. </list_item></list></paragraph>
7 </clause>