25.12.2015 Views

Professional

1l6xhbR

1l6xhbR

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

■<br />

■<br />

If you want to continue to the next chapter, keep Visual Studio 2015 running and turn to<br />

Chapter 5, “Using compound assignment and iteration statements.”<br />

If you want to exit Visual Studio 2015 now, on the File menu, click Exit. If you see a Save dialog<br />

box, click Yes and save the project.<br />

Quick reference<br />

To Do this Example<br />

Determine whether two values are<br />

equivalent<br />

Use the == operator or the != operator. answer == 42<br />

Compare the value of two expressions Use the = operator. age >= 21<br />

Declare a Boolean variable<br />

Create a Boolean expression that is<br />

true only if two conditions are both<br />

true<br />

Create a Boolean expression that is<br />

true if either of two conditions is true<br />

Use the bool keyword as the type of the<br />

variable.<br />

Use the && operator.<br />

Use the || operator.<br />

bool inRange;<br />

inRange = (lo

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!