Sdílet prostřednictvím


InkRecognizer.Equals Method

Determines whether the specified object is equal to the InkRecognizer.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Syntax

'Declaration
Public Overrides Function Equals ( _
    obj As Object _
) As Boolean
'Usage
Dim instance As InkRecognizer 
Dim obj As Object 
Dim returnValue As Boolean 

returnValue = instance.Equals(obj)
public override bool Equals(
    Object obj
)
public:
virtual bool Equals(
    Object^ obj
) override
public override function Equals(
    obj : Object
) : boolean

Parameters

Return Value

Type: System.Boolean
true if the current InkRecognizer and the otherRecognizer are instances of the same InkRecognizer; otherwise, false.

Remarks

The object otherRecognizer is considered equal to this InkRecognizer if otherRecognizer and this InkRecognizer are instances of the same InkRecognizer.

Examples

The following example gets the default recognizer and the Japanese recognizer and compares them for equality.

' Get the InkRecognitionCollection from the InkAnalyzer 
Dim inkRecognizers As Microsoft.Ink.InkRecognizerCollection = _
    theInkAnalyzer.GetInkRecognizersByPriority()

' Only check fo equality if there are 2 ink recognizers  
' associated with the InkAnalyzer. 
If inkRecognizers.Count >= 2 Then 
    ' Get the default InkRecognizer. 
    Dim defaultInkRecognizer As Microsoft.Ink.InkRecognizer = _
        inkRecognizers(0)

    ' Get the Japanese InkRecognizer. 
    Dim japaneseInkRecognizer As Microsoft.Ink.InkRecognizer = _
        inkRecognizers.GetPriorityInkRecognizer(&H11)

    ' Check the default recognizer. 
    If Not defaultInkRecognizer.Equals(japaneseInkRecognizer) Then 
        ' The default InkRecognizer is not the Japanese InkRecognizer. 
    End If 
End If
// Get the InkRecognitionCollection from the InkAnalyzer
InkRecognizerCollection inkRecognizers = theInkAnalyzer.GetInkRecognizersByPriority();

// Only check fo equality if there are 2 ink recognizers  
// associated with the InkAnalyzer. 
if (inkRecognizers.Count >= 2)
{
    // Get the default InkRecognizer.
    Microsoft.Ink.InkRecognizer defaultInkRecognizer =
        inkRecognizers[0];

    // Get the Japanese InkRecognizer.
    Microsoft.Ink.InkRecognizer japaneseInkRecognizer =
        inkRecognizers.GetPriorityInkRecognizer(0x0011);

    // Check the default recognizer. 
    if (!defaultInkRecognizer.Equals(japaneseInkRecognizer))
    {
        // The default InkRecognizer is not the Japanese InkRecognizer.
    }
}

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkRecognizer Class

InkRecognizer Members

Microsoft.Ink Namespace