Breyta

Deila með


Timer.Start Method

Definition

Starts raising the Elapsed event by setting Enabled to true.

public:
 void Start();
public void Start ();
member this.Start : unit -> unit
Public Sub Start ()

Exceptions

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

Remarks

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

You can also start timing by setting Enabled to true.

Note

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

A call to the Start method when the timer is enabled has no effect.

Applies to

See also