Unary Plus and Minus

You’ve seen the + and - tokens being used for binary addition and subtraction already, but they can also be used in a unary context, with one operand. In that setting, they are used—not surprisingly—for unary plus and minus:

int x = 42;int y = -x;

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.