How to make it so that when you start the timer, it immediately executes the code in the attached method, and not wait for the interval to start.
For example:
var makeWorkTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(15) }; makeWorkTimer.Tick += (sender, args) => { Console.WriteLine("Hello"); }; makeWorkTimer.Start(); How to make cw execute immediately, without waiting for the 15 second interval on the first run of the method?