# TableOfContentsCollection Class

> Contains all tables of contents in a certain part of the document. It is a collection of objects of the type TableOfContents. A collection object can be obtained with the TextControl.TablesOfContents, the WPF.TextControl.TablesOfContents, the HeaderFooter.TablesOfContents or the TextFrame.TablesOfContents property. The TableOfContentsCollection class implements the IEnumerable and the ICollection interfaces.

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

---

## On This Page

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

---

## In This Section

- [TableOfContentsCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/add-method/llms.txt): Adds a new table of contents to the document at the current text input position.
- [TableOfContentsCollection.AddResult Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/addresult-enumeration/llms.txt): Specifies the result when an existing table of contents has been updated or a new table of contents has been added to the document.
- [TableOfContentsCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/copyto-method/llms.txt): Copies the elements of the collection to an array, starting at a particular index.
- [TableOfContentsCollection.Count Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/count-property/llms.txt): Gets the number of elements contained in the collection.
- [TableOfContentsCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/getenumerator-method/llms.txt): Returns an enumerator that can be used to iterate through the collection.
- [TableOfContentsCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/getitem-method/llms.txt): Gets a particular table of contents from the collection.
- [TableOfContentsCollection.IsSynchronized Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/issynchronized-property/llms.txt): Returns true if the collection is designed to be thread safe, otherwise, it returns false.
- [TableOfContentsCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/item-property/llms.txt): Gets the table of contents with the specified number from the collection. The number must be between 1 and Count. In C# this property is the indexer for the TableOfContentsCollection class.
- [TableOfContentsCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/remove-method/llms.txt): Removes a table of contents from the collection including all its text and including all DocumentTargets to where the table's links point.
- [TableOfContentsCollection.SyncRoot Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/syncroot-property/llms.txt): Gets an object that can be used to synchronize access to the collection.

---

## Nearby

- **Previous:** [TableOfContents.Update Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontents/update-method/llms.txt)
- **Next:** [TableOfContentsCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontentscollection/add-method/llms.txt)
