system.timers.timer autoreset default value

本文关键字:default value autoreset timer timers system | 更新日期: 2023-09-27 18:09:12

我只是想知道这个属性的默认值。我原以为那是假的,但它似乎是真的。

我花了5分钟来寻找这个问题,它可能会让一些人在未来不会失去这个时间…

system.timers.timer autoreset default value

msdn的应答默认为true:

http://msdn.microsoft.com/en-us/library/system.timers.timer.autoreset%28v=vs.110%29.aspx

反射器的应答默认值= true:

public Timer(double interval) : this()
{
    ...
}
public Timer()
{
    this.interval = 100.0;
    this.enabled = false;
    //HERE!!!!
    this.autoReset = true;
    this.initializing = false;
    this.delayedEnable = false;
    this.callback = new TimerCallback(this.MyTimerCallback);
}