public class MyClass
{
public static void Main()
{
Container[] containerArray = new Container[10];
for( int i=0; i < containerArray.Length; i++ ){
containerArray[i] = new Container( i );
}
Container[] containerArrayCopy = new Container[10];
containerArray.CopyTo( containerArrayCopy, 0 );
containerArrayCopy[2].V = 3;
for( int i=0; i < containerArray.Length; i++ ){
Console.Write( "{0}, ", containerArray[i].V );
}
Console.WriteLine();
}
}
public class Container{
public int V;
public Container(int i ){
V = i;
}
}
2007-03-08
00:52:35
·
1 answers
·
asked by
terrabytes404
2
in
Computers & Internet
➔ Programming & Design