Share via


WordList.Remove Method

Removes a single string from a WordList object.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Sub Remove ( _
    s As String _
)
'Usage
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
)
Not applicable.

Parameters

  • s

Remarks

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.

Example

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
'...

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

WordList Class
WordList Members
Microsoft.Ink Namespace
RecognizerContext
WordList.Add