Beispiel #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");
        }
Beispiel #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");
            }
        }
Beispiel #3
0
 public DefaultAction(DCallBack callback)
     : base(ActionType.Default)
 {
     Callback = callback;
 }