# TableCell.Length Property

> Gets the number of characters in the table cell. If the table cell is merged, the property returns -1.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.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 for WPF > Reference > TXTextControl > TableCell.Length Property
- **529 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecell/length-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecell/length-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecell/length-property/llms-full.txt

---

### Description

Gets the number of characters in the table cell. If the table cell is merged, the property returns -1.

### Syntax

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

```vbnet
Public ReadOnly Property Length As Integer
```

### Examples

The following example creates a small report table and works with its structure by using `TableCell.Length`.

```csharp
textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableCell tableCell = table.Cells[2, 2];

textControl.Select(tableCell.Start, tableCell.Length);
Console.WriteLine("Table Cell is ready for use.");
```

```vbnet
textControl.Tables.Add(3, 3, 10)
Dim table As Table = textControl.Tables.GetItem(10)
Dim tableCell As TableCell = table.Cells(2, 2)

textControl.Select(tableCell.Start, tableCell.Length)
Console.WriteLine("Table Cell is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TableCell.Formula Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecell/formula-property/llms-full.txt)
- **Next:** [TableCell.Name Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecell/name-property/llms-full.txt)
