# PageNumberFieldCollection Class

> An instance of the PageNumberFieldCollection class contains the page number fields in a header or footer of a Text Control document. Page number fields are represented through objects of the type PageNumberField. An instance of this class can be obtained with the HeaderFooter.PageNumberFields property. The PageNumberFieldCollection class implements the IEnumerable and the ICollection interfaces. For more information see the technical article Text Fields and Hypertext Links.

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

---

## On This Page

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

---

## In This Section

- [PageNumberFieldCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfieldcollection/add-method/llms.txt): Inserts a new page number field at the current input position of a header or footer.
- [PageNumberFieldCollection.Clear Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfieldcollection/clear-method/llms.txt): Removes all page number fields contained in the collection from the document.
- [PageNumberFieldCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfieldcollection/copyto-method/llms.txt): Copies the elements of the collection to an array, starting at a particular index.
- [PageNumberFieldCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfieldcollection/getitem-method/llms.txt): Gets a particular page number field from the collection.
- [PageNumberFieldCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfieldcollection/item-property/llms.txt): Gets the field with the specified number from the collection. The number must be between 1 and Count. In C# this property is the indexer for the PageNumberFieldCollection class.
- [PageNumberFieldCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfieldcollection/remove-method/llms.txt): Removes a page number from a header or footer of a Text control document.

---

## Nearby

- **Previous:** [PageNumberField.StartNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfield/startnumber-property/llms.txt)
- **Next:** [PageNumberFieldCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagenumberfieldcollection/add-method/llms.txt)
