O'Reilly logo

Special Edition Using C# by NIIT

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

Using Expressions

An expression is a combination of operators and operands that can be used to compute a value. Expressions are used to provide specific information. An expression generally consists of one or more operators and at least one operand. C# supports the following expressions:

  • Value

  • Variable

  • Namespace

  • Type

  • Method group

  • Property access

  • Event access

  • Indexer access

Operators and Operands

An operator is a symbol that signifies an action. An operand refers to the objects that are being manipulated. For instance, in the expression 2-a, 2 and a are the operands and – is the operator.

Classification of Operators

Operators can be organized into four categories: primary, unary, binary, and ternary operators. Before each category is examined, it ...

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