Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Timers.​Timer

Assembly: System.ComponentModel.TypeConverter

Inheritance: object → MarshalByRefObjectComponentModel.​Component → Timer

Implemented Interfaces

Generates an event after a set interval, with an option to generate recurring events.

Properties

public bool
AutoReset
Gets or sets a Boolean indicating whether the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event only once ( <see langword="false" /> ) or repeatedly ( <see langword="true" /> ).
public bool
Enabled
Gets or sets a value indicating whether the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event.
public double
Interval
Gets or sets the interval, expressed in milliseconds, at which to raise the <see cref="E:System.Timers.Timer.Elapsed" /> event.
Gets or sets the site that binds the <see cref="T:System.Timers.Timer" /> to its container in design mode.
SynchronizingObject
Gets or sets the object used to marshal event-handler calls that are issued when an interval has elapsed.
protected bool
CanRaiseEvents
Container
protected bool
DesignMode

Methods

public void
BeginInit​()
Begins the run-time initialization of a <see cref="T:System.Timers.Timer" /> that is used on a form or by another component.
public void
Close​()
Releases the resources used by the <see cref="T:System.Timers.Timer" /> .
protected void
Dispose​(bool disposing)
Releases all resources used by the current <see cref="T:System.Timers.Timer" /> .
disposing <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.
public void
EndInit​()
Ends the run-time initialization of a <see cref="T:System.Timers.Timer" /> that is used on a form or by another component.
public void
Start​()
Starts raising the <see cref="E:System.Timers.Timer.Elapsed" /> event by setting <see cref="P:System.Timers.Timer.Enabled" /> to <see langword="true" /> .
public void
Stop​()
Stops raising the <see cref="E:System.Timers.Timer.Elapsed" /> event by setting <see cref="P:System.Timers.Timer.Enabled" /> to <see langword="false" /> .
public void
Dispose​()
protected void
Finalize​()
protected object
GetService​(Type service)
public string
ToString​()
public object
GetLifetimeService​()
Inherited from MarshalByRefObject
public object
InitializeLifetimeService​()
Inherited from MarshalByRefObject
protected MarshalByRefObject
MemberwiseClone​(bool cloneIdentity)
Inherited from MarshalByRefObject
public bool
Equals​(object obj)
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object