# TableOfContentsCollection.AddResult Enumeration

> Specifies the result when an existing table of contents has been updated or a new table of contents has been added to the document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 29.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > TableOfContentsCollection.AddResult Enumeration
- **622 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontentscollection/addresult-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontentscollection/addresult-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontentscollection/addresult-enumeration/llms-full.txt

---

### Description

Specifies the result when an existing table of contents has been updated or a new table of contents has been added to the document.

### Syntax

```csharp
public enum TableOfContentsCollection.AddResult
```

```vbnet
Public Enum TableOfContentsCollection.AddResult
```

### Members

| Member | Value | Description |
|---|---|---|
| ContentNotFound | 1 | The table of contents could not be inserted or updated because it has no content. A paragraph with a structure level as specified through the [TableOfContents.MinimumStructureLevel](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/minimumstructurelevel-property/llms-full.txt) and [TableOfContents.MaximumStructureLevel](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/maximumstructurelevel-property/llms-full.txt) properties could not be found. |
| Error | 0 | An unexpected error has occurred or the current text input position is a position where a table of contents cannot be inserted. Tables of content cannot be inserted in a [TextField](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfield/llms-full.txt) or a [HypertextLink](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/hypertextlink/llms-full.txt). Furthermore, tables of contents cannot be nested. |
| Successful | 2 | The table of contents has successfully been inserted or updated. |

### Examples

The following example selects the Error value from the Add Result enumeration and uses it as a documented workflow choice.

```csharp
TableOfContentsCollection.AddResult value = TableOfContentsCollection.AddResult.Error;
Console.WriteLine($"Using Add Result: {value}");
```

```vbnet
Dim value As TableOfContentsCollection.AddResult = TableOfContentsCollection.AddResult.Error
Console.WriteLine($"Using Add Result: {value}")
```

---

## Nearby

- **Previous:** [TableOfContentsCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontentscollection/add-method/llms-full.txt)
- **Next:** [TableOfContentsCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontentscollection/copyto-method/llms-full.txt)
