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 function Remove(
    s : String
)

Parameters

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.

Examples

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 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

WordList Class

WordList Members

Microsoft.Ink Namespace

RecognizerContext

WordList.Add