Compartir a través de


WordList.Merge Method

Merges a specified WordList object into this WordList object.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Sub Merge ( _
    wl As WordList _
)
'Usage
Dim instance As WordList
Dim wl As WordList

instance.Merge(wl)
public void Merge (
    WordList wl
)
public:
void Merge (
    WordList^ wl
)
public void Merge (
    WordList wl
)
public function Merge (
    wl : WordList
)
Not applicable.

Parameters

  • wl
    The specified WordList object to merge into this WordList object.

Remarks

Words that already exist in the WordList object object are not added a second time.

Example

This C# example creates a WordList object from a StringCollection, theUserDictionary, and then merges it into the RecognizerContext.WordList.

using System.Collections.Specialized;
using Microsoft.Ink
//...
RecognizerContext theRecognizerContext;
StringCollection theUserDictionary;
//...
// Initialize theRecognizerContext and theUserDictionary objects here.
//...
WordList theUserWordList = new WordList();
foreach (string theString in theUserDictionary)
{
    theUserWordList.Add(theString);
}
theUserWordList.Merge(theRecognizerContext.WordList);
// Note: there should be no strokes in the Strokes property of the
//       Recognizer Context
// when setting the WordList property
theRecognizerContext.WordList = theUserWordList;
//...

This Microsoft® Visual Basic® .NET example creates a WordList object from a StringCollection, theUserDictionary, and then merges it into the RecognizerContext.WordList.

Imports System.Collections.Specialized
Imports Microsoft.Ink
'...
Dim theRecognizerContext As RecognizerContext
Dim theUserDictionary As StringCollection
'...
'Initialize theRecognizerContext and theUserDictionary objects here.
'...
Dim theUserWordList As New WordList()
Dim theString As String
For Each theString In theUserDictionary
    theUserWordList.Add(theString)
Next
theUserWordList.Merge(theRecognizerContext.WordList)
' Note: there should be no strokes in the Strokes property of the
'       Recognizer Context
' when setting the WordList property
theRecognizerContext.WordList = theUserWordList

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

WordList Class
WordList Members
Microsoft.Ink Namespace
RecognizerContext

Other Resources

Using Application Dictionaries