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 TimeSpan, _ ByVal period As TimeSpan _ ) [C#] public Timer( TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period ); [C++] public: Timer( TimerCallback* callback, Object* state, TimeSpan dueTime, TimeSpan period ); [JScript] public function Timer( callback : TimerCallback, state : Object, dueTime : TimeSpan, period : TimeSpan );
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | If either the milliseconds of dueTime or period is less than zero or greater than MaxValue. |
Timer Class | Timer Members | System.Threading Namespace | Timer Constructor Overload List