Ejemplo n.º 1
0
 static void Test01Sub(ClassInheritanceTest cls)
 {
     Console.WriteLine("Test invoking from base type...");
     cls.TestAbstract();
     cls.TestVirtual();
     cls.TestField();
 }
Ejemplo n.º 2
0
      public static bool TestAs03()
      {
          BB aa = new BB();
          Dictionary <int, BB> dic = new Dictionary <int, BB>();

          dic[0] = aa;
          IAs1 ias = dic[0] as IAs1;

          if (ias == null)
          {
              throw new Exception("error");
          }
          else
          {
              ias.AA1();
          }
          ClassInheritanceTest id = dic[0] as ClassInheritanceTest;

          if (id == null)
          {
              throw new Exception("error2");
          }
          else
          {
              id.TestAbstract();
          }
          return(true);
      }