Bagikan melalui


RecognizerContext.Clone Method

RecognizerContext.Clone Method

Creates a copy of this RecognizerContext object.

Definition

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

Return Value

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

Exceptions

ObjectDisposedException Leave Site: The RecognizerContext object is disposed.

Remarks

The duplicate RecognizerContext object is an exact copy of the original RecognizerContext object, but no relation between the two RecognizerContext objects exists.

This method returns a copy of the original RecognizerContext that contains the same settings as the original, but does not include the recognition results, if any. The settings that are copied include the recognition guide, character Autocomplete mode, a reference to the original ink, and all properties that improve the recognition results, such as the Factoid and RecognitionFlags properties.

Examples

[C#]

This C# example creates a copy of a RecognizerContext, theRecognizerContext, and names the copy theCloneRecognizerContext.

RecognizerContext theCloneRecognizerContext = theRecognizerContext.Clone();

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example creates a copy of a RecognizerContext, theRecognizerContext, and names the copy theCloneRecognizerContext.

Dim theCloneRecognizerContext As RecognizerContext = theRecognizerContext.Clone()

See Also