# SectionCollection Class

> An instance of the SectionCollection class contains all sections of a document. A document has at least one section. An instance of this class can be obtained with the TextControl.Sections property. The SectionCollection class implements the IEnumerable and the ICollection interfaces.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 14.0
- **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 > SectionCollection Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/sectioncollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/sectioncollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/sectioncollection/llms-full.txt

---

## On This Page

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

---

## In This Section

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

---

## Nearby

- **Previous:** [SectionBreakKind Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/sectionbreakkind/enumeration/llms.txt)
- **Next:** [SectionCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/sectioncollection/add-method/llms.txt)
