# UserDictionary.ToArray Method

> Converts all user dictionary entries to a string array.

- **Product:** TX Spell .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WinForms.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TXSpell.Core.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.dll` from the setup
- **Path:** TX Spell .NET for Windows Forms > Reference > TXTextControl.Proofing > UserDictionary.ToArray Method
- **498 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/userdictionary/toarray-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/userdictionary/toarray-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/userdictionary/toarray-method/llms-full.txt

---

### Description

Converts all [user dictionary](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/userdictionary/llms-full.txt) entries to a string array.

### Syntax

```csharp
public string[] ToArray();
```

```vbnet
Public Function ToArray() As String()
```

### Return Value

The return value is a string array of all [user dictionary](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/userdictionary/llms-full.txt) entries. If the [user dictionary](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/userdictionary/llms-full.txt) is not added to the [TXSpell.Dictionaries](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspell/dictionaries-property/llms-full.txt) or [TXSpellChecker.Dictionaries](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/txspellchecker/dictionaries-property/llms-full.txt) [DictionaryCollection](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dictionarycollection/llms-full.txt), the method returns an empty string array.

### Examples

The following example uses To Array in a focused User Dictionary workflow.

```csharp
string[] results = userDictionary.ToArray();
foreach (string text in results)
{
    Console.WriteLine(text);
}
```

```vbnet
Dim results As String() = userDictionary.ToArray()
For Each text As String In results
    Console.WriteLine(text)
Next
```

---

## Nearby

- **Previous:** [UserDictionary.Save Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/userdictionary/save-method/llms-full.txt)
- **Next:** [UserDictionaryWordAddedEventArgs Class](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/userdictionarywordaddedeventargs/llms-full.txt)
