O'Reilly logo

Windows Forms Programming in C# by Chris Sells

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Long-Running Operations

Imagine that the value of pi in System.Math.PI, at only 20 digits, just isn't accurate enough for you. In that case, you may find yourself writing an application like the one in Figure 14.1 to calculate pi to an arbitrary number of digits.

Figure 14.1. Digits of Pi Application

This program takes as input the number of digits of pi to calculate and, when the Calc button is pressed, shows the progress as the calculation happens.

Progress Indication

Although most applications don't need to calculate the digits of pi, many kinds of applications need to perform long-running operations, whether it's printing, making a Web service ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required