# UserDefinedPropertyDictionary.Remove Method

> Removes a document property from the dictionary.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > UserDefinedPropertyDictionary.Remove Method
- **509 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/remove-method/llms-full.txt

---

### Description

Removes a document property from the dictionary.

### Syntax

```csharp
public void Remove(string name);
```

```vbnet
Public Sub Remove(name As String)
```

### Parameters

| Parameter | Description |
|---|---|
| name | Specifies the name of the document property to remove. |

### Examples

The following example removes obsolete department metadata before export.

```csharp
UserDefinedPropertyDictionary properties = new();
properties.Add("ReviewStatus", "Approved");
properties.Add("Department", "Finance");
if (properties.Contains("Department"))
{
    properties.Remove("Department");
}
```

```vbnet
Dim properties As New UserDefinedPropertyDictionary()
properties.Add("ReviewStatus", "Approved")
properties.Add("Department", "Finance")
If properties.Contains("Department") Then
    properties.Remove("Department")
End If
```

---

## Nearby

- **Previous:** [UserDefinedPropertyDictionary.Names Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/names-property/llms-full.txt)
- **Next:** [UserDefinedPropertyDictionary.Values Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/userdefinedpropertydictionary/values-property/llms-full.txt)
