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 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.