static void Main() { FEvent fe = new FEvent(); fe.FiveEvent += new OnFiveHandler(Callback); Random random = new Random(); for (int i = 0; i < 10; ++i) { int rn = random.Next(6); Console.WriteLine(rn); if (rn == 5) fe.OnFiveEvent(); } }
static void Main() { FEvent fe = new FEvent(); fe.FiveEvent += new OnFiveHandler(Callback); Random random = new Random(); for (int i = 0; i < 10; ++i) { int rn = random.Next(6); Console.WriteLine(rn); if (rn == 5) { fe.OnFiveEvent(); } } }