using System;namespace ArrayDemo{ class A { public int Value = 5; } class Program { static void Main() { A[] AArray1 = new A[3]{new A(),new A(),new A()}; A[] AArray2 = (A[])AArray1.Clone();//如果我不帶這個(gè)括號(hào),系統(tǒng)就會(huì)報(bào)圖片錯(cuò)誤! AArray2[0].Value = 100; AArray2[1].Value = 200; AArray2[2].Value = 300; Console.WriteLine("{0}",AArray2[0].Value); Console.WriteLine("{0}",AArray2[1].Value); Console.WriteLine("{0}",AArray2[2].Value); } }}
2 回答
- 2 回答
- 0 關(guān)注
- 166 瀏覽
添加回答
舉報(bào)
0/150
提交
取消