Example #1
0
 public static Container Test(bool p, int x, int y)
 {
     Container c1 = new Container(x);
     Container c2 = new Container(y);
     Container c = p ? c1 : c2;
     Console.WriteLine(c.X(5));
     return c1;
 }
Example #2
0
 public static Container Test2(int n)
 {
     int cs0_n = n;
     Container cs1 = new Container();
     Increase_n_5(ref cs0_n);
     Increase_n(ref cs0_n, n);
     Increase_5(cs1);
     return cs1;
 }
Example #3
0
 public static Container Test(int n)
 {
     Container cs0 = new Container(n);
     Container cs1 = new Container(0);
     Increase(cs0, 5);
     Increase(cs0, n);
     Increase(cs1, 5);
     return cs1;
 }
Example #4
0
 public static Container TestResult(bool p, int x, int y)
 {
     Container c1 = new Container(x);
     int container1_x = 0;
     Container.Container_1(ref container1_x, x);
     if (p) {
         Console.WriteLine(c1.X_2());
         return c1;
     } else {
         Console.WriteLine(Container.X_1(ref container1_x));
         return c1;
     }
 }
Example #5
0
 public static double Test(int x)
 {
     Container[] cs = new Container[3];
     for (int i = 0; i < cs.Length; i++)
         cs[i] = new Container(i+1, x);
     double sx = 0;
     for (int i = 0; i < cs.Length; i++)
         sx += cs[i].GetX();
     double sy = 0;
     for (int i = 0; i < cs.Length; i++)
         sy += cs[i].GetY();
     return sx/sy;
 }
Example #6
0
 // i = 5
 public static void Increase_5(Container c)
 {
     c.n += 5;
     Console.WriteLine("{0}", c.n);
 }
Example #7
0
 public static void Increase(Container c, int i)
 {
     c.n += i;
     Console.WriteLine("{0}", c.n);
 }