Поделиться через


WordList.Remove - метод

Обновлен: Ноябрь 2007

Removes a single string from a WordList object.

Пространство имен:  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
)

Параметры

Заметки

If a string is added to a word list, its capitalized versions are also implicitly added. For instance, adding "hello" implicitly adds "Hello" and "HELLO". Therefore, removing "hello" will also implicity remove "Hello" and "HELLO". However, if you add "hello" and then pass "Hello" to the Remove method, the call has no effect, because "Hello" was never explicity added.

A WordList object can include string representations of words, phrases, part numbers, or any other string that a user might write that is not in the system dictionary.

Примеры

This C# example shows an example of removing all of the words from a StringCollection, theUserDictionary, from the 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);
}
//...

This Microsoft® Visual Basic® .NET example shows an example of removing all of the words from a StringCollection, theUserDictionary, from the 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