WordList.Merge 方法
將指定的 WordList 物件合併到這個 WordList 物件中。
命名空間: Microsoft.Ink
組件: Microsoft.Ink (在 Microsoft.Ink.dll 中)
語法
'宣告
Public Sub Merge ( _
wl As WordList _
)
'用途
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
)
參數
- wl
型別:Microsoft.Ink.WordList
指定的 WordList 物件,用來合併到這個 WordList 物件中。
備註
不會再次加入已經存在 WordList 物件中的單字。
範例
在這個範例中,會建立兩個 WordList 物件並在其集合中加入文字。若使用 Merge 方法,則會合併兩個 WordList 物件的內容。最後會具現化 RecognizerContext 物件,並將第一個 WordList 物件指派至其 WordList 屬性。
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;
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0