Exemple #1
0
        static void Main(string[] args)
        {
            //Delegate @delegate;
            //@delegate = TakeString;

            //string str = Console.ReadLine();

            //string[] arr = str.Split();

            //Console.WriteLine(@delegate(arr));

            //Console.ReadKey();

            MobileLink mob = new MobileLink();

            mob.Notify2 += ZeroAccount;
            //mob.Talk(10);

            mob.Acticate();

            //mob.Talk(10);

            mob.Add(5);
            mob.Talk(6);
            Console.ReadKey();
        }
Exemple #2
0
        public static void ZeroAccount(object sender, string message)
        {
            Console.WriteLine(message);
            MobileLink mob = sender as MobileLink;

            if (mob != null)
            {
                Console.WriteLine($"Total talking second: {mob.TalkingSeconds}");
            }
        }