# TextCharCollection.Count Property

> Gets the number of elements contained in the collection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 10.1
- **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 > TextCharCollection.Count Property
- **415 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textcharcollection/count-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textcharcollection/count-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textcharcollection/count-property/llms-full.txt

---

### Description

Gets the number of elements contained in the collection.

### Syntax

```csharp
public int Count { get; }
```

```vbnet
Public ReadOnly Property Count As Integer
```

### Examples

The following example works with text chars in the current document by using `TextCharCollection.Count`.

```csharp
TextCharCollection textCharCollection = textControl.TextChars;
textControl.Text = "Quarterly results\nRevenue increased by 12%.";

Console.WriteLine($"Count: {textCharCollection.Count}");
Console.WriteLine("Text Char Collection is ready for use.");
```

```vbnet
Dim textCharCollection As TextCharCollection = textControl.TextChars
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."

Console.WriteLine($"Count: {textCharCollection.Count}")
Console.WriteLine("Text Char Collection is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TextCharCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textcharcollection/copyto-method/llms-full.txt)
- **Next:** [TextCharCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textcharcollection/getenumerator-method/llms-full.txt)
