Chapter 4

Smooth Operators

IN THIS CHAPTER

Bullet Performing a little arithmetic

Bullet Doing some logical arithmetic

Bullet Complicating matters with compound logical operators

Mathematicians create variables and manipulate them in various ways, adding them, multiplying them, and — here’s a toughie — even integrating them. Chapter 2 of this minibook describes how to declare and define variables. However, it says little about how to use variables to get anything done after you declare them. This chapter looks at the operations you can perform on variables to do some work. Operations require operators, such as +, , =, <, and &. This chapter also discusses arithmetic, logical, and other types of operators.

Remember You don't have to type the source code for this chapter manually. In fact, using the downloadable source is a lot easier. You can find the source for this chapter in the \CSAIO4D2E\BK01\CH04 folder of the downloadable source. See the Introduction for details on how to find these source files.

Performing Arithmetic

The set of arithmetic operators breaks down into several groups: the simple arithmetic ...

Get C# 10.0 All-in-One For Dummies 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.