O'Reilly logo

The C# Programming Language (Covering C# 4.0), Fourth Edition by Peter Golde, Scott Wiltamuth, Mads Torgersen, Anders Hejlsberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7. Expressions

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

7.1 Expression Classifications

An expression is classified as one of the following:

• A value. Every value has an associated type.

• A variable. Every variable has an associated type—namely, the declared type of the variable.

Vladimir Reshetnikov

Types of local variables and lambda expression parameters can be inferred by the compiler in many cases, and do not always need to be explicitly specified in declarations.

• A namespace. An expression with this classification can only appear as the left-hand side of a member-access7.6.4). In any other context, an expression ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required