Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. using System.Timers;
  2. public Timer timer;
  3. public void Czas()
  4. {
  5. timer = new Timer();
  6. timer.Tick += new EventHandler(timer_Tick);
  7. timer.Interval = 3000; // in miliseconds
  8. timer.Start();
  9. }
  10.  
  11. private void timer_Tick(object sender, EventArgs e)
  12. {
  13. File.WriteAllLines(path, lista);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement