Bridge

TimerCallback Delegate

Represents the method that handles calls from a Timer.

Namespace:  System.Threading
Assembly:  Bridge (in Bridge.dll)

Syntax


[ExternalAttribute]
public delegate void TimerCallback(
	Object state
)
<ExternalAttribute> _
Public Delegate Sub TimerCallback ( _
	state As Object _
)
[ExternalAttribute]
public delegate void TimerCallback(
	Object^ state
)

Parameters

state
Type: System..::..Object
An object containing application-specific information relevant to the method invoked by this delegate, or null.

Remarks


Use a TimerCallback delegate to specify the method that is called by a Timer. This method does not execute in the thread that created the timer; it executes in a separate thread pool thread that is provided by the system. The TimerCallback delegate invokes the method once after the start time elapses, and continues to invoke it once per timer interval until the Dispose method is called, or until the Timer.Change method is called with the interval value Infinite. The timer delegate is specified when the timer is constructed, and cannot be changed. The start time for a Timer is passed in the dueTime parameter of the Timer constructors, and the period is passed in the period parameter. For an example that demonstrates creating and using a TimerCallback delegate, see System.Threading.Timer.