25.12.2015 Views

Professional

1l6xhbR

1l6xhbR

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .491<br />

Quick reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .491<br />

Chapter 22 Operator overloading 493<br />

Understanding operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .493<br />

Operator constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494<br />

Overloaded operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494<br />

Creating symmetric operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .496<br />

Understanding compound assignment evaluation . . . . . . . . . . . . . . . . . . .498<br />

Declaring increment and decrement operators . . . . . . . . . . . . . . . . . . . . .499<br />

Comparing operators in structures and classes . . . . . . . . . . . . . . . . . . . . . .500<br />

Defining operator pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500<br />

Implementing operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501<br />

Understanding conversion operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508<br />

Providing built-in conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508<br />

Implementing user-defined conversion operators . . . . . . . . . . . . .509<br />

Creating symmetric operators, revisited . . . . . . . . . . . . . . . . . . . . . .510<br />

Writing conversion operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .511<br />

Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .513<br />

Quick reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514<br />

PART IV<br />

BUILDING UNIVERSAL WINDOWS PLATFORM APPLICA-<br />

TIONS WITH C#<br />

Chapter 23 Improving throughput by using tasks 517<br />

Why perform multitasking by using parallel processing? . . . . . . . . . . . . .517<br />

The rise of the multicore processor . . . . . . . . . . . . . . . . . . . . . . . . . .518<br />

Implementing multitasking by using the Microsoft .NET Framework . . .519<br />

Tasks, threads, and the ThreadPool . . . . . . . . . . . . . . . . . . . . . . . . . . 520<br />

Creating, running, and controlling tasks . . . . . . . . . . . . . . . . . . . . . .521<br />

Using the Task class to implement parallelism . . . . . . . . . . . . . . . . .524<br />

Abstracting tasks by using the Parallel class . . . . . . . . . . . . . . . . . . .536<br />

When not to use the Parallel class . . . . . . . . . . . . . . . . . . . . . . . . . . .541<br />

Contents xv

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

Saved successfully!

Ooh no, something went wrong!