다음을 통해 공유


Array.Clone Method

Creates a shallow copy of an array.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

public virtual Object Clone ()

Return Value

A shallow copy of an array.

Remarks

A shallow copy of an array contains only the reference elements contained in the original array, whether they are reference types or value types; it does not copy the objects that the references refer to. The references in the new array (the shallow copy) point to the same objects that the references in the original array point to.

By contrast, a deep copy of an array copies the original array's objects and everything directly or indirectly referenced by those objects.

A clone array is of the same type as the original array.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Array Class
Array Members
System Namespace