O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

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

Timers

Timers are a familiar entity to Visual Basic programmers, as they have been part of that language for many years. The Timer class is available on the .NET Compact Framework and is thus available for both C# and Visual Basic .NET.

Timers are objects that have a Tick method into which developers insert code. The code in the Tick method is executed at regular intervals, which the developer gets to set.

Thus, the Timer is very useful for executing a body of code at specific intervals. The Timer is meant for performing light work at regular intervals, but it is not a good choice for executing code that will take a long time to execute. For such cases a Thread is a far better choice.

The advantages of using Timers on the .NET Compact Framework ...

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