Version

Clone Method (TBTextBox)

Creates a deep copy of this text box.
Syntax
'Declaration
 
Public Shadows Function Clone() As Object
public new object Clone()

Return Value

A deep copy of this text box.
Remarks

This method creates a cloned copy of the TBTextBox object, including a clone of its DefaultStyle, if any. It copies all property values assigned to the calling instance of TBTextBox.

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