Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace EventDriven1a
- {
- public delegate void TickEvenetHanler(object sender, EventArgs e);
- class Time
- {
- public event TickEvenetHanler Tick;
- public void Start()
- {
- while (true){
- System.Threading.Thread.Sleep(1000);
- if (Tick != null) {
- Tick(this, EventArgs.Empty);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement