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();//如果我不带这个括号,系统就会报图片错误! 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 回答
- 0 关注
- 142 浏览
添加回答
举报
0/150
提交
取消