Export (0) Print
Expand All

Timer.Start Method

Starts raising the Elapsed event by setting Enabled to true.

Namespace: System.Timers
Assembly: System (in system.dll)

public:
void Start ()
public void Start ()
public function Start ()
Not applicable.

Exception typeCondition

ArgumentOutOfRangeException

The Timer is created with an interval equal to or greater than Int32.MaxValue + 1, or set to an interval less than zero.

If Enabled is set to true and AutoReset is set to false, the Timer raises the Elapsed event only once, the first time the interval elapses. When Enabled is true and AutoReset is true, the Timer continues to raise the Elapsed event on the specified interval.

You can also start timing by setting Enabled to true.

NoteNote:

If AutoReset is false, the Start method must be called in order to start the count again.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft