Share via


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 function Merge(
    wl : WordList
)

Parameters

Remarks

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

Examples

In this example, two WordList objects are created and words are added to their collections. Using the Merge method, the contents of the two WordList objects are combined. Finally, a RecognizerContext object is instantiated, and the first WordList object assigned to its WordList property.

Dim wList1 As WordList = New WordList()
Dim wList2 As WordList = New WordList()
' add a single word to wList1
wList1.Add("thunk")
' add an array of words to wList2 
Dim words() As String = {"Microsoft", "Tablet", "PC"}
wList2.Add(words)
' merge wList2 into wList1
wList1.Merge(wList2)
' create a new RecognizerContext object and assign wList1 
Dim RC As RecognizerContext = New RecognizerContext()
RC.WordList = wList1
WordList wList1 = new WordList();
WordList wList2 = new WordList();
// add a single word to wList1
wList1.Add("thunk");
// add an array of words to wList2
string[] words = { "Microsoft", "Tablet", "PC" };
wList2.Add(words);
// merge wList2 into wList1
wList1.Merge(wList2);
// create a new RecognizerContext object and assign wList1
RecognizerContext RC = new RecognizerContext();
RC.WordList = wList1;

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

WordList Class

WordList Members

Microsoft.Ink Namespace

RecognizerContext

Other Resources

Using Application Dictionaries