# Section.HeadersAndFooters Property

> Gets a collection of all headers and footers of the section. The property's value is an object of the type HeaderFooterCollection.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 14.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl > Section.HeadersAndFooters Property
- **414 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/section/headersandfooters-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/section/headersandfooters-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/section/headersandfooters-property/llms-full.txt

---

### Description

Gets a collection of all headers and footers of the section. The property's value is an object of the type [HeaderFooterCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/headerfootercollection/llms-full.txt).

### Syntax

```csharp
public HeaderFooterCollection HeadersAndFooters { get; }
```

```vbnet
Public ReadOnly Property HeadersAndFooters As HeaderFooterCollection
```

### Examples

The following example works with the first section of the current document by using `Section.HeadersAndFooters`.

```csharp
Section section = textControl.Sections[1];

foreach (HeaderFooter headerFooter in section.HeadersAndFooters)
{
    Console.WriteLine(headerFooter.ConnectedToPrevious);
}
```

```vbnet
Dim section As Section = textControl.Sections(1)

For Each headerFooter As HeaderFooter In section.HeadersAndFooters
    Console.WriteLine(headerFooter.ConnectedToPrevious)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [Section.Format Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/section/format-property/llms-full.txt)
- **Next:** [Section.Length Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/section/length-property/llms-full.txt)
