Initializes a new instance of the Timer class.
[Visual Basic] Overloads Public Sub New( _ ByVal callback As TimerCallback, _ ByVal state As Object, _ ByVal dueTime As Integer, _ ByVal period As Integer _ ) [C#] public Timer( TimerCallback callback, object state, int dueTime, int period ); [C++] public: Timer( TimerCallback* callback, Object* state, int dueTime, int period ); [JScript] public function Timer( callback : TimerCallback, state : Object, dueTime : int, period : int );
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | If either dueTime or period is less than-1. |
Timer Class | Timer Members | System.Threading Namespace | Timer Constructor Overload List