ECMA-334 C# Language Specification15.6: Expression statements |
An expression-statement
evaluates a given expression. The value computed by the expression, if any, is discarded.
statement-expression
;
invocation-expression
object-creation-expression
assignment
post-increment-expression
post-decrement-expression
pre-increment-expression
pre-decrement-expression
Not all expressions are permitted as statements.
Execution of an expression statement evaluates the contained expression and then transfers control to the end point of the expression statement. The end point of an expression-statement
is reachable if that expression-statement
is reachable.