asp.net.ph

Array.Clone Method

System Namespace   Array Class


Creates a shallow copy of the Array.

[ VB ]
<Serializable>
Overridable Public Function Clone ( ) As Object Implements _
   ICloneable.Clone

[ C# ]
[Serializable]
public virtual object Clone ( );

[ C++ ]
[Serializable]
public: virtual 
   Object* Clone ( );

[JScript ]
public Serializable
function Clone ( ) : Object;

Return Value

A shallow copy of the Array.

Implements

ICloneable.Clone

Remarks

A shallow copy of an Array copies only the elements of the Array, whether they are reference types or value types, but it does not copy the objects that the references refer to. The references in the new Array point to the same objects that the references in the original Array point to.

In contrast, a deep copy of an Array copies the elements and everything directly or indirectly referenced by the elements.

The clone is of the same Type as the original Array.

See Also

Array Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph