예제 #1
0
        private static void Main(string[] args)
        {
            Fans SomgM = new Fans("小明");
            Fans SomgG = new Fans("小刚");
            //女神正在写微博
            NvShenWeiBo nv = new NvShenWeiBo("今天天气好好啊,谁带我出去玩");

            //小明和小刚是女神的粉丝
            nv.AddFans(new FansHandler(SomgM.TiShi));
            nv.AddFans(new FansHandler(SomgG.TiShi));
            //这个时候女神发布了微博,小明和小刚都收到了提示
            nv.Update();
            Console.WriteLine("--------------------------------------------");
            Console.WriteLine("小刚,不想关注女神了");
            nv.RemoveFans(new FansHandler(SomgG.TiShi));
            nv.Update();
            Console.ReadLine();
        }
예제 #2
0
 private static void Main(string[] args)
 {
     Fans SomgM = new Fans("小明");
     Fans SomgG = new Fans("小刚");
     //女神正在写微博
     NvShenWeiBo nv = new NvShenWeiBo("今天天气好好啊,谁带我出去玩");
     //小明和小刚是女神的粉丝
     nv.AddFans(new FansHandler(SomgM.TiShi));
     nv.AddFans(new FansHandler(SomgG.TiShi));
     //这个时候女神发布了微博,小明和小刚都收到了提示
     nv.Update();
     Console.WriteLine("--------------------------------------------");
     Console.WriteLine("小刚,不想关注女神了");
     nv.RemoveFans(new FansHandler(SomgG.TiShi));
     nv.Update();
     Console.ReadLine();
 }