SHARE
TWEET

Untitled

a guest Sep 13th, 2017 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Timers;
  3.  
  4. public class program
  5. {
  6. public static Timer nTimer;
  7.  
  8. public static void Main()
  9. {
  10.     NewTimer();
  11. }
  12.  
  13. public static void NewTimer()
  14. {
  15.     nTimer = new Timer(2000);
  16.     nTimer.Elapsed += TimerCall;
  17.     nTimer.AutoReset = true;
  18.     nTimer.Enabled = true;
  19. }
  20.  
  21. public static void TimerCall(Object source, ElapsedEventArgs e)
  22. {
  23.     Console.WriteLine("Вывод");
  24. }
  25. }
RAW Paste Data
Top