WordList.Remove Method
WordList.Remove Method |
Removes a single string from a WordList object.
Definition
Visual Basic .NET Public Sub Remove( _
ByVal s As String _
)C# public void Remove(
string s
);Managed C++ public: void Remove(
String *s
);
Parameters
s System.String. The string to remove from the WordList.
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
[C#]
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); } //...
[VB.NET]
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 '...
See Also