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 → MarshalByRefObject → ComponentModel.​Component → Timer
Implemented Interfaces
- ComponentModel.​IComponent (Inherits: IDisposable) Implemented by: Component
- ComponentModel.​ISupportInitialize
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.
Site
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
Events
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" /> .
protected
object
GetService​(Type service)
Inherited from ComponentModel.​Component
protected
MarshalByRefObject
MemberwiseClone​(bool cloneIdentity)
Inherited from MarshalByRefObject
public
bool
Equals​(object obj)
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object