public static void InheritanceTest07()
      {
          TestClass2 cls = new TestCls5();

          cls.VMethod1();
          int val = 0;

          cls.VMethod3(ref val);
          if (val != 11)
          {
              throw new Exception($"{val} != 11");
          }
          float val2 = cls.AbMethod2(val);

          if (val2 != 12.2f)
          {
              throw new Exception($"{val2} != 12.1f");
          }

          cls = new TestCls6();
          val = 0;
          cls.VMethod3(ref val);
          if (val != 21)
          {
              throw new Exception($"{val} != 21");
          }
          val2 = cls.AbMethod2(val);
          if (val2 != 24.2f)
          {
              throw new Exception($"{val2} != 23.2f");
          }
      }
      public static void InheritanceTest07()
      {
          TestClass2 cls = new TestCls5();

          Console.WriteLine(cls.VMethod2());
          Console.WriteLine(cls.AbMethod2(122));
          int val = 0;

          cls.VMethod3(ref val);
          if (val != 11)
          {
              throw new Exception();
          }
          Console.WriteLine(val);
      }
      public static void InheritanceTest18()
      {
          TestCls5 obj = new TestCls5();

          TestClass2.Register(obj);

          TestCls5 res;

          Alloc <TestCls5>(out res);
          res.bbbb = 5000;
          if (res.bbbb != 5000)
          {
              throw new Exception();
          }
      }
Exemple #4
0
      public static void InheritanceTest07()
      {
          TestClass2 cls = new TestCls5();

          Console.WriteLine(cls.AbMethod2(122));
      }