Esempio n. 1
0
        public void receiveMessage(object sender, marryMessageArgs e)
        {
            LiHua lihua = sender as LiHua;

            Console.WriteLine(e.messageGet);
            Console.WriteLine("好的" + lihua.Name + "一定到");
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            LiHua    lihua    = new LiHua("李华");
            XiaoMing xiaoming = new XiaoMing();

            lihua.messageSend += (sender, e) => { Console.WriteLine(e.messageGet); Console.WriteLine($"好的"); };
            lihua.messageBeSended();
            Console.ReadKey();
        }