Calling the erload:System.Diagnostics.Debug.Assert method on the System.Diagnostics.Debug class from within the Timer.Tick event may not behave as expected, as displaying the assertion dialog box may cause Windows to raise the Timer.Tick event repeatedly. We recommend that you refrain from testing assertions within this event, and use the erload:System.Diagnostics.Debug.Write, erload:System.Diagnostics.Debug.WriteIf, erload:System.Diagnostics.Debug.WriteLine, or erload:System.Diagnostics.Debug.WriteLineIf methods instead.
For more information about handling events, see Consuming Events.