# TextControl.TextChars Property

> Gets a collection of all characters contained in the text part with the input focus. This can be the main text, a text frame or a header or footer. The property's value is an object of the type TextCharCollection.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 10.1
- **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.TextChars Property
- **348 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/textchars-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/textchars-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/textchars-property/llms-full.txt

---

### Description

Gets a collection of all characters contained in the text part with the input focus. This can be the main text, a text frame or a header or footer. The property's value is an object of the type [TextCharCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcharcollection/llms-full.txt).

### Syntax

```csharp
public TextCharCollection TextChars { get; }
```

```vbnet
Public ReadOnly Property TextChars As TextCharCollection
```

### Examples

The following example iterates through the text chars collection and processes each text char.

```csharp
foreach (TextChar textChar in textControl.TextChars)
{
    Console.WriteLine(textChar.Number);
}
```

```vbnet
For Each textChar As TextChar In textControl.TextChars
    Console.WriteLine(textChar.Number)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TextControl.TextBackColorDialog Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/textbackcolordialog-method/llms-full.txt)
- **Next:** [TextControl.TextContextMenuOpening Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/textcontextmenuopening-event/llms-full.txt)
