# TextControl.Undo Method

> Undoes the last edit operation in the Text Control.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > TextControl.Undo Method
- **230 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/undo-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/undo-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/undo-method/llms-full.txt

---

### Description

Undoes the last edit operation in the Text Control.

### Syntax

```csharp
public void Undo();
```

```vbnet
Public Sub Undo()
```

### Examples

The following example reverts the last editing action. The created object is then available to the surrounding document workflow.

```csharp
textControl.Undo();
Console.WriteLine("Text Control is ready for use.");
```

```vbnet
textControl.Undo()
Console.WriteLine("Text Control is ready for use.")
```

---

## Nearby

- **Previous:** [TextControl.TrackedChangeStateChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/trackedchangestatechanged-event/llms-full.txt)
- **Next:** [TextControl.UndoActionName Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/undoactionname-property/llms-full.txt)
