Expressions

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

Expression Classifications

An expression can be 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 access method invocation. The required access method 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 access method to get the property value is invoked.

Additional information is contained in the following subsections: