Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Timers;
- public class program
- {
- public static Timer nTimer;
- public static void Main()
- {
- NewTimer();
- }
- public static void NewTimer()
- {
- nTimer = new Timer(2000);
- nTimer.Elapsed += TimerCall;
- nTimer.AutoReset = true;
- nTimer.Enabled = true;
- }
- public static void TimerCall(Object source, ElapsedEventArgs e)
- {
- Console.WriteLine("Вывод");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement