# ServerTextControl.Sections Property

> Gets a collection of all sections in the document. The property's value is an object of the type SectionCollection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 14.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ServerTextControl.Sections Property
- **330 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/sections-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/sections-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/sections-property/llms-full.txt

---

### Description

Gets a collection of all sections in the document. The property's value is an object of the type [SectionCollection](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/sectioncollection/llms-full.txt).

### Syntax

```csharp
public SectionCollection Sections { get; }
```

```vbnet
Public ReadOnly Property Sections As SectionCollection
```

### Examples

The following example iterates through the sections collection and processes each section.

```csharp
foreach (Section section in textControl.Sections)
{
    Console.WriteLine(section.Number);
}
```

```vbnet
For Each section As Section In textControl.Sections
    Console.WriteLine(section.Number)
Next
```

### Limitations

Runtime only.

Read only.

---

## Nearby

- **Previous:** [ServerTextControl.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/save-method/llms-full.txt)
- **Next:** [ServerTextControl.Select Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/select-method/llms-full.txt)
