Arity of Operators

Operators have an arity, indicating the number of operands on which they operate. For example, negating an integer value takes just one operand and is said to be a unary operator. Other operations, such as addition or Boolean conjunction, require two operands and are therefore classified as binary operators. The maximum number of operands in any operator in the C# language is three, making those operators ternary operators.

Get C# 5.0 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.