Export (0) Print
Expand All

SortedList.Clone Method

Creates a shallow copy of the SortedList.

[Visual Basic]
Public Overridable Function Clone() As Object Implements _
   ICloneable.Clone
[C#]
public virtual object Clone();
[C++]
public: virtual Object* Clone();
[JScript]
public function Clone() : Object;

Return Value

A shallow copy of the SortedList.

Implements

ICloneable.Clone

Remarks

A shallow copy of a collection copies only the elements of the collection, 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 collection point to the same objects that the references in the original collection point to.

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SortedList Class | SortedList Members | System.Collections Namespace | CopyTo

Show:
© 2015 Microsoft