Esempio n. 1
0
        static void Main(string[] args)
        {
            //CubeEvenno(3, FnSucess, FnError);

            //  CubeEvenno(4, (s) => { Console.WriteLine(s); },
            //      (e) => { Console.WriteLine(e); });

            DCallBack result = (s) => { Console.WriteLine
                                            ("Displayed string is " + s); };

            result("Hello");
        }
Esempio n. 2
0
        static void CubeEvenno(int number, DCallBack fnsuccess, DCallBack fnerror)
        {
            int result = 0;

            if (number % 2 == 0)
            {
                result = number * number * number;
                fnsuccess(result.ToString());
            }
            else
            {
                fnerror("It is not even no");
            }
        }
Esempio n. 3
0
 public DefaultAction(DCallBack callback)
     : base(ActionType.Default)
 {
     Callback = callback;
 }