private static void Example1() { MathService mathService = new MathService(); //mathService.OutBoundDelegate += (result) => Console.WriteLine("Result = " + result); //mathService.OutBoundDelegate = delegate(double result) { Console.WriteLine("Result = " + result); }; /*-> Bu Bildiğin event*/ mathService.OutBoundDelegate = OnOutboundDelegate; mathService.MathDelegate(3, 4); //Console.WriteLine(result); }
private static void Example2() { MathService mathService = new MathService(); mathService.OutboundEvent += OnOutboundDelegate; }