Arithmetic Operators

Time to take a look at the various operators in C#. One popular category consists of arithmetic operators, including +, -, *, /, and %. I bet you can guess the role of most, if not all, of them: + is used for addition, - for subtraction and negation, * for multiplication, / for division, and % for remainder after division.

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.