Illustrated C# 2010 by Daniel M. Solis

Illustrated C# 2010 by Daniel M. Solis

Author:Daniel M. Solis
Language: eng
Format: epub
Publisher: Apress®
Published: 2010-12-12T16:00:00+00:00


class Program

{

static void Main()

{

A[] AArray1 = new A[3] { new A(), new A(), new A() }; // Step 1

A[] AArray2 = (A[]) AArray1.Clone(); // Step 2

AArray2[0].Value = 100;

AArray2[1].Value = 200;

AArray2[2].Value = 300; // Step 3

}

}

Figure 14-17. Cloning a reference type array produces two arrays referencing the same objects.

Comparing Array Types

Table 14-2 summarizes some of the important similarities and differences between the three types of arrays.

C H A P T E R 15

Delegates



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.