I'm trying to use the timer class as stated in this question:
using System.Timers;
_
 System.Timers.Timer aTimer = new System.Timers.Timer();
 aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
 aTimer.Interval = 1;
 aTimer.Enabled = true;
 aTimer.Start();
 void OnTimedEvent(object source, ElapsedEventArgs e)
 {
 Text += "hello world";
 }
but it not only doesn't work, it also gives an error message in Microsoft Visual Studio when I close the application.
The target process was terminated with code 0 by evaluating the function 'System.AppDomain.IsAppXModel'.
If the problem happens regularly consider disabling the Tools -> Options, "Debugging -> General -> Enable property evaluation and other implicit function calls" or change the code to disable evaluation of this method. See help for information on doing this.

 
    