# Line.Length Property

> Gets the number of characters in the line including the break character.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl > Line.Length Property
- **424 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/line/length-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/line/length-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/line/length-property/llms-full.txt

---

### Description

Gets the number of characters in the line including the break character.

### Syntax

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

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

### Examples

The following example examines the first line in a short document by using `Line.Length`.

```csharp
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
Line line = textControl.Lines[1];

textControl.Select(line.Start, line.Length);
Console.WriteLine("Line is ready for use.");
```

```vbnet
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
Dim line As Line = textControl.Lines(1)

textControl.Select(line.Start, line.Length)
Console.WriteLine("Line is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [Line.Baseline Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/line/baseline-property/llms-full.txt)
- **Next:** [Line.Number Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/line/number-property/llms-full.txt)
