Expressions

An expression is a sequence of operators and operands. This section determines the syntax, order of evaluation of operands and operators, and meaning of expressions.

Expression Classifications

An expression is classified as one of the following:

The final result of an expression is never a namespace, type, method group, or event access. These expression categories are intermediate structures that are only permitted in certain contexts.

A property access is always reclassified as a value by executing an accessor invocation. The required accessor is determined by the context, in which the property is used. If it is used in the context of an assignment statement, the method for setting the property value is invoked. Otherwise, the accessor to get the property value is invoked.

Additional information is contained in the following subsections: