示例#1
0
 public void Teach(ITeach student)
 {
     if (!student.ICanNow && !WorkNow)
     {
         Console.WriteLine("Noone cant");
         return;
     }
     if (!student.ICanNow || WorkNow)
     {
         Console.WriteLine("Someone cant");
         return;
     }
 }
示例#2
0
        static void Main(string[] args)
        {
            //TestInterface.Test01();

            //TestInterface.Test04();

            //在工厂在返回对象
            ITeach teach = ObjectFactory.CreateObject();

            teach.StudyCourse();
            Console.WriteLine(teach.Exam("123456789"));


            //反射测试:
            TestReflection.Test();

            Console.ReadLine();
        }
示例#3
0
 private static void Test05(ITeach teach)
 {
     teach.StudyCourse();
     Console.WriteLine(teach.Exam("123"));
     ;
 }