Ink.Clone Method

Ink.Clone Method

Creates a copy of this Ink object.

Definition

Visual Basic .NET Public Function Clone() As Ink
C# public Ink Clone();
Managed C++ public: Ink* Clone();

Return Value

Microsoft.Ink.Ink. The new copy of the original Ink object.

Exceptions

ObjectDisposedException Leave Site: The Ink object is disposed.

Remarks

In most scenarios, the new Ink object is an exact copy of the original Ink object, but no relation between the two objects exists. The only scenario in which the duplicate Ink object is not an exact copy of the original object is when you clone an Ink object that has been modified but not yet saved. In this case, although the Dirty property of the original Ink object is True, the duplicate Ink object's Dirty property is False. All other properties are exact copies.

Examples

[C#]

This C# example creates a copy of an Ink object, theInk.

Ink theInkClone = theInk.Clone();

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example creates a copy of an Ink object, theInk.

Dim theInkClone As Ink = theInk.Clone()

See Also