# ServerTextControl.TextChars Property

> Gets a collection of all characters contained in the main text of the document. The property value is an object of the type TextCharCollection.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 12.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > ServerTextControl.TextChars Property
- **335 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textchars-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textchars-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textchars-property/llms-full.txt

---

### Description

Gets a collection of all characters contained in the main text of the document. The property 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:** [ServerTextControl.TextBackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textbackcolor-property/llms-full.txt)
- **Next:** [ServerTextControl.TextFieldCreated Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textfieldcreated-event/llms-full.txt)
