Timer Constructor (TimerCallback)
Initializes a new instance of the Timer class with an infinite period and an infinite due time, using the newly created Timer object as the state object.
Call this constructor when you want to use the Timer object itself as the state object. After creating the timer, use the Change method to set the interval and due time.
This constructor specifies an infinite due time before the first callback and an infinite interval between callbacks, in order to prevent the first callback from occurring before the Timer object is assigned to the state object.
Namespace:
System.ThreadingAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public Timer( TimerCallback callback )
<TemplateAttribute> _ Public Sub New ( _ callback As TimerCallback _ )
[TemplateAttribute] public: Timer( TimerCallback^ callback )
Parameters
- callback
- Type: System.Threading..::..TimerCallback
A TimerCallback delegate representing a method to be executed.