# DictionaryCollection.Remove Method

> Removes objects of the type Dictionary from the collection and invalidate them for spell checking and suggestion operations.

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.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 WPF > Reference > TXTextControl.Proofing > DictionaryCollection.Remove Method
- **552 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/dictionarycollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/dictionarycollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/dictionarycollection/remove-method/llms-full.txt

---

### Description

Removes objects of the type [Dictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/dictionary/llms-full.txt) from the [collection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/dictionarycollection/llms-full.txt) and invalidate them for [spell checking](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/check-method/llms-full.txt) and [suggestion](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/createsuggestions-method/llms-full.txt) operations.

### Syntax

```csharp
public void Remove(Dictionary dictionary);
```

```vbnet
Public Sub Remove(dictionary As Dictionary)
```

### Parameters

| Parameter | Description |
|---|---|
| dictionary | Specifies the [dictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/dictionary/llms-full.txt). |

### Examples

The following example removes the first dictionary when the collection is not empty.

```csharp
if (dictionaryCollection.Count > 0)
{
    TXTextControl.Proofing.Dictionary dictionary = dictionaryCollection[1];
    dictionaryCollection.Remove(dictionary);
}
```

```vbnet
If dictionaryCollection.Count > 0 Then
    Dim dictionary As TXTextControl.Proofing.Dictionary = dictionaryCollection.Item(1)
    dictionaryCollection.Remove(dictionary)
End If
```

### Remarks

This method throws an exception when called while the SpellCheckDialog is open (except for removing dictionaries of type [UserDictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/userdictionary/llms-full.txt) when the built-in options dialog was invoked by a SpellCheckdialog's dialog button).

---

## Nearby

- **Previous:** [DictionaryCollection.LoadDictionaryDelayed Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/dictionarycollection/loaddictionarydelayed-property/llms-full.txt)
- **Next:** [DictionaryRemovedEventArgs Class](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/dictionaryremovedeventargs/llms-full.txt)
