# LineCollection.Item Property

> Gets the line from the collection. In C# this property is the indexer for the LineCollection class.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 10.1
- **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 > LineCollection.Item Property
- **449 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/item-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/item-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/item-property/llms-full.txt

---

### Description

Gets the line from the collection. In C# this property is the indexer for the LineCollection class.

### Syntax

```csharp
public Line this[int number] { get; }
```

```vbnet
Default Public ReadOnly Property Item(number As Integer) As Line
```

### Examples

The following example works with lines in the current document by using `LineCollection.Item`.

```csharp
LineCollection lineCollection = textControl.Lines;
textControl.Text = "Quarterly results\nRevenue increased by 12%.";

Console.WriteLine($"Item: {lineCollection[10]}");
Console.WriteLine("Line Collection is ready for use.");
```

```vbnet
Dim lineCollection As LineCollection = textControl.Lines
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."

Console.WriteLine($"Item: {lineCollection.Item(10)}")
Console.WriteLine("Line Collection is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [LineCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/getitem-method/llms-full.txt)
- **Next:** [ListFormat Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/listformat/llms-full.txt)
