示例#1
0
        static void Main(string[] args)
        {
            MathServices mathserv = new MathServices();

            mathserv.MathPerformed += OnMathPerformed;

            // actual do something
            mathserv.MultiplyNumbers(1.22, 3.44);
        }
示例#2
0
        static void Main(string[] args)
        {
            MathServices mathserv = new MathServices();

            mathserv.MathPerformed += (result) =>
                                      Console.WriteLine("Calc result: " + result);

            // actual do something
            mathserv.CalculateNumbers(1.22, 3.44, (value1, value2) => value1 * value2);
            int i = 0;
        }
示例#3
0
        static void Main(string[] args)
        {
            MathServices mathserv = new MathServices();

            mathserv.MathPerformed += delegate(object sender, MathPerformanceEventArgs e) {
                Console.WriteLine("Calc result: " + e.Result);
            };

            // actual do something
            mathserv.MultiplyNumbers(1.22, 3.44);
        }
示例#4
0
        static void Main(string[] args)
        {
            MathServices mathserv = new MathServices();

            mathserv.MathPerformed += (sender, e) => {
                Console.WriteLine("Calc result: " + e.Result);
            };

            // actual do something
            mathserv.MultiplyNumbers(1.22, 3.44);
            int i = 0;
        }