# TrackedChangeCollection.Remove Method

> Removes a tracked change from the collection. Depending on the accept parameter the change is either accepted or rejected. When a change is rejected, inserted text is removed and deleted text is reinserted.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 26.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > TrackedChangeCollection.Remove Method
- **625 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/trackedchangecollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/trackedchangecollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/trackedchangecollection/remove-method/llms-full.txt

---

### Description

Removes a tracked change from the collection. Depending on the accept parameter the change is either accepted or rejected. When a change is rejected, inserted text is removed and deleted text is reinserted.

### Syntax

```csharp
public bool Remove(TrackedChange trackedChange, bool accept);
```

```vbnet
Public Function Remove(trackedChange As TrackedChange, accept As Boolean) As Boolean
```

### Parameters

| Parameter | Description |
|---|---|
| trackedChange | Specifies the tracked change to remove. |
| accept | When this parameter is true, the change is accepted, otherwise, it is rejected. |

### Return Value

The return value is true, if the change could be removed. Otherwise, it is false.

### Examples

The following example accepts all revisions authored by the review team while safely avoiding mutation during enumeration.

```csharp
TrackedChange[] approvedChanges = textControl.TrackedChanges
    .Cast<TrackedChange>()
    .Where(change => change.UserName == "Review Team")
    .ToArray();

foreach (TrackedChange change in approvedChanges)
{
    textControl.TrackedChanges.Remove(change, true);
}
```

```vbnet
Dim approvedChanges = textControl.TrackedChanges.
    Cast(Of TrackedChange)().
    Where(Function(change) change.UserName = "Review Team").
    ToArray()

For Each change As TrackedChange In approvedChanges
    textControl.TrackedChanges.Remove(change, True)
Next
```

---

## Nearby

- **Previous:** [TrackedChangeCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/trackedchangecollection/item-property/llms-full.txt)
- **Next:** [TrackedChangeCollection.SyncRoot Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/trackedchangecollection/syncroot-property/llms-full.txt)
