コード例 #1
0
        private void Main05()
        {
            int min0 = 5, max0 = 5, min1 = 7, max1 = 11, a = 0, b = 99;

            int[][] myT = MyUtility.RandomTab2d(min0, max0, min1, max1, a, b);
            Console.WriteLine("--------------------------myT-----------------------------");
            MyUtility.printTab(myT);
            int[][] myT2;
            myT2       = myT;
            myT2[0][0] = -9;
            Console.WriteLine("--------------------------myT=myT2-----------------------------");
            MyUtility.printTab(myT);
            Console.WriteLine("--------------------------myT2=myT-----------------------------");
            MyUtility.printTab(myT2);
            //myT2 is reference the same as myT1 so we do a method witch copies tab
            myT2 = MyUtility.CopyTab(myT);
            Console.WriteLine("--------------------------myT-----------------------------");
            MyUtility.printTab(myT);
            Console.WriteLine("--------------------------myT2-----------------------------");
            MyUtility.printTab(myT2);
        }