Version

Clone Method (TBObject)

Creates and returns a deep copy of this object.
Syntax
'Declaration
 
Public Function Clone() As Object
public object Clone()

Return Value

A deep copy of this object.
Remarks

This method creates a cloned copy of the TBObject base object. It copies all base class property values assigned to the calling instance of TBObject.

It handles cloning of the Tag property specially. If a reference-type object is assigned to the Tag, and it implements ICloneable, then it will be deeply cloned. Otherwise its reference is shallow copied.

Developers must exercise caution with their handling of cloned instances. In particular, cloned instances may be difficult to find by object reference-equality tests when they've been placed into collections.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also