次の方法で共有


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
)

パラメータ

解説

既に WordList オブジェクトに存在する単語は、2 回目には追加されません。

この例では、2 つの WordList オブジェクトを作成し、単語をそのコレクションに追加します。次に、Merge メソッドを使用して、2 つの 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

参照

参照

WordList クラス

WordList メンバ

Microsoft.Ink 名前空間

RecognizerContext

その他の技術情報

Using Application Dictionaries