次の方法で共有


WordList.Remove メソッド

WordList オブジェクトから単一の文字列を削除します。

名前空間 :  Microsoft.Ink
アセンブリ :  Microsoft.Ink (Microsoft.Ink.dll 内)

構文

'宣言
Public Sub Remove ( _
    s As String _
)
'使用
Dim instance As WordList
Dim s As String

instance.Remove(s)
public void Remove(
    string s
)
public:
void Remove(
    String^ s
)
public void Remove(
    String s
)
public function Remove(
    s : String
)

パラメータ

解説

文字列が単語リストに追加される場合、その大文字の文字列も暗黙に追加されます。たとえば、"hello" を追加すると、暗黙に "Hello" と "HELLO" が追加されます。したがって、"hello" を削除すると、暗黙に "Hello" と "HELLO" も削除されます。ただし、"hello" を追加してから Remove メソッドに "Hello" を渡しても、"Hello" は明示的に追加されていないため、この呼び出しは無効になります。

WordList オブジェクトには、単語、句、部品番号、またはユーザーが書き込むシステム辞書にない文字列の文字列表現を含めることができます。

この C# の例では、StringCollection の theUserDictionary のすべての単語を RecognizerContext.WordList から削除します。

using System.Collections.Specialized;
using Microsoft.Ink
//...
RecognizerContext theRecognizerContext;
StringCollection theUserDictionary;
//...
// Initialize the theRecognizerContext and theUserDictionary objects here.
//...
foreach (string theString in theUserDictionary)
{
    theRecognizerContext.WordList.Remove(theString);
}
//...

この Microsoft® Visual Basic® .NET の例では、StringCollection の theUserDictionary のすべての単語を RecognizerContext.WordList から削除します。

Imports System.Collections.Specialized
Imports Microsoft.Ink
'...
Dim theRecognizerContext As RecognizerContext
Dim theUserDictionary As StringCollection
'...
'Initialize the theRecognizerContext and theUserDictionary objects here.
'...
Dim theString As String
For Each theString In theUserDictionary
    theRecognizerContext.WordList.Remove(theString)
Next
'...

プラットフォーム

Windows Vista

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

WordList クラス

WordList メンバ

Microsoft.Ink 名前空間

RecognizerContext

WordList.Add