# LineCollection Class

> An instance of the LineCollection class contains all text lines in a Text Control document or part of the document represented through objects of the type Line. An instance of this class can be obtained with the TextControl.Lines, HeaderFooter.Lines or TextFrame.Lines property. The LineCollection class implements the IEnumerable and the ICollection interfaces.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **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
- **Implements:** `System.Collections.ICollection`, `System.Collections.IEnumerable`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > LineCollection Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/#members)

---

## In This Section

- [LineCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/copyto-method/llms.txt): Copies the elements of the collection to an array, starting at a particular index.
- [LineCollection.Count Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/count-property/llms.txt): Gets the number of elements contained in the collection.
- [LineCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/getenumerator-method/llms.txt): Returns an enumerator that can be used to iterate through the collection.
- [LineCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/getitem-method/llms.txt): Gets a particular line from the collection.
- [LineCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/item-property/llms.txt): Gets the line from the collection. In C# this property is the indexer for the LineCollection class.

---

## Nearby

- **Previous:** [Line.TextBounds Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/line/textbounds-property/llms.txt)
- **Next:** [LineCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/linecollection/copyto-method/llms.txt)
