Suppose we are using System.Windows.Forms.Timer in a .Net application, Is there any meaningful difference between using the Start() and Stop() methods on the timer, versus using the Enabled property?
For example, if we wish to pause a timer while we do some processing, we could do:
myTimer.Stop();
// Do something interesting here.
myTimer.Start();
or, we could do:
myTimer.Enabled = false;
// Do something interesting here.
myTimer.Enabled = true;
If there is no significant difference, is there a consensus in the community about which option to choose?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…