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 Long, _ ByVal period As Long _ ) [C#] public Timer( TimerCallback callback, object state, long dueTime, long period ); [C++] public: Timer( TimerCallback* callback, Object* state, __int64 dueTime, __int64 period ); [JScript] public function Timer( callback : TimerCallback, state : Object, dueTime : long, period : long );
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | If either dueTime or period is less than-1. |
NotSupportedException | If either dueTime or period is greater than 4294967294 (0xfffffffe). |
Timer Class | Timer Members | System.Threading Namespace | Timer Constructor Overload List