Beispiel #1
0
        static void Main()
        {
            A301 va = new A301();

            va.x = 10;
            va.y = 20;
            Console.WriteLine(va.getSum());

            va.setXY(100, 200);
            Console.WriteLine(va.getSum());

            int[] v2 = new int[2] {
                11, 22
            };
            va.setXY(v2);

            string[] v3 = new string[2] {
                "100", "200"
            };
            va.setXY(v3);

            A301 va2 = new A301();

            va2.setXY(1111, 2222);
            va.setXY(va2);

            A301 va3 = new A301(55, 66); // Constructor value

            Console.WriteLine(va3.getSum());
            va3.x = 88;
            Console.WriteLine(va3.getSum());

            Console.ReadKey();
        } //Method Main
Beispiel #2
0
 public void setXY(A301 va)
 {
     setXY(va.x, va.y);
 }