Compartir a través de


ArrayList.Clone Method

Creates a shallow copy of the ArrayList collection.

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

Syntax

public virtual Object Clone ()

Return Value

A shallow copy of the ArrayList collection.

Remarks

A shallow copy of a collection copies only the objects contained in the collection, whether they are reference types or value types; it does not copy the objects that the references refer to. The references in the new collection point to the same objects that the references in the original collection point to.

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

Version Information

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

See Also

Reference

ArrayList Class
ArrayList Members
System.Collections Namespace