Save Method
- Namespace
TXTextControl.Proofing
- Package
TXTextControl.asTXSpell. WinForms. SDK TXSpell.from the private NuGet feed or Text Control Offline Packagesdll
- Also in
TXTextControl.asTXSpell. Core. SDK TXSpell.dll
Description
Saves the complete content of the user dictionary in a file at the specified path or as a string array. If using a file name without any file path, the user dictionary is saved in the default dictionary folder. The method has no effect, if the specified path does not end with ".txd" or the user dictionary is not added to the TXSpell.Dictionaries or TXSpellChecker.Dictionaries DictionaryCollection.
Syntax
Save(string)
Saves the complete content of the user dictionary in a file.
public bool Save(string userDictionaryPath);Public Function Save(userDictionaryPath As String) As Boolean| Parameter | Description |
|---|---|
| userDictionaryPath | Specifies a file that is used to save the user dictionary. If the file does not exist, it is created. Otherwise its contents are overwritten. If the path is not valid, an ArgumentException is thrown. |
Save(out string[])
Saves the complete content of the user dictionary as a string array.
public void Save(out string[] stringArray);Public Sub Save(ByRef stringArray As String())| Parameter | Description |
|---|---|
| stringArray | Specifies a string array that is used to save the user dictionary. |
Return Value
The method returns true, if the user dictionary could be saved or false if not.
Examples
The following example saves document content in a specified format.
if (userDictionary.Save("document.docx"))
{
Console.WriteLine("Save completed successfully.");
}If userDictionary.Save("document.docx") Then
Console.WriteLine("Save completed successfully.")
End If