# TextControl.Lines Property

> Gets a collection of all lines 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 LineCollection.

- **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.Lines Property
- **336 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/lines-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/lines-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/lines-property/llms-full.txt

---

### Description

Gets a collection of all lines 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 [LineCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/linecollection/llms-full.txt).

### Syntax

```csharp
public LineCollection Lines { get; }
```

```vbnet
Public ReadOnly Property Lines As LineCollection
```

### Examples

The following example iterates through the lines collection and processes each line.

```csharp
foreach (Line line in textControl.Lines)
{
    Console.WriteLine(line.Baseline);
}
```

```vbnet
For Each line As Line In textControl.Lines
    Console.WriteLine(line.Baseline)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TextControl.LanguageDialog Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/languagedialog-method/llms-full.txt)
- **Next:** [TextControl.ListFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/listformat-property/llms-full.txt)
