views:

85

answers:

3

Hi,

I would like to call a function automatically lets say every 2 secs.

Is this possible with .NET, and if so can you please paste some code? This will be used in Windows Mobile 6 SDK

thanks

+2  A: 

Use the System.Threading.Timer:

http://msdn.microsoft.com/library/system.threading.timer.aspx

Jason
+7  A: 

Have a look at the Timer Class:

Provides a mechanism for executing a method at specified intervals.

Platforms: [...], .NET Compact Framework

You can find an example in the linked MSDN documentation.

dtb
+1  A: 

The Timer Class is what you need to use.

Blounty