Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Events
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Pogodynka { public delegate void TickHandler(Pogodynka p, EventArgs e); //Delegate TickHandler public event TickHandler Tick; //Event Tick public void start() { int counter =0; while(true) { System.Threading.Thread.Sleep(1000); if(Tick != null) { Tick(this, null); } if( counter > 2) break; counter++; } } } public class Tool { public void ZapiszSie(Pogodynka pogo) { pogo.Tick += new Pogodynka.TickHandler(Dwoneczek); } public void Dwoneczek(Pogodynka p, EventArgs e) { System.Console.WriteLine("HEARD IT"); } } public class Program { public static void Main(string[] args) { Pogodynka p = new Pogodynka(); Tool t = new Tool(); t.ZapiszSie(p); p.start(); //Your code goes here Console.WriteLine("Hello, world!"); } } }
run
|
edit
|
history
|
help
0
DateTime Subtract TotalDays
adxaxsdc
Display the pattern like diamond by using c# for loop
test
first
Working with Strings
Returning object as parameter (pre-example without overloading)
Time by 15 minutes
sktieritjre
Calculate Combinatorics (cards)