# TableOfContentsCollection.Item Property

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.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 WPF > Reference > TXTextControl > TableOfContentsCollection.Item Property
- **662 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontentscollection/item-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontentscollection/item-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontentscollection/item-property/llms-full.txt

---

### Description

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.

### Syntax

```csharp
public TableOfContents this[int number] { get; }
```

```vbnet
Default Public ReadOnly Property Item(number As Integer) As TableOfContents
```

### Examples

The following example works with tables of contents in the current document by using `TableOfContentsCollection.Item`.

```csharp
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
TableOfContentsCollection tableOfContentsCollection = textControl.TablesOfContents;
tableOfContentsCollection.Add(new TableOfContents(1, 3) { Name = "Contents", ID = 100 });

Console.WriteLine($"Item: {tableOfContentsCollection[10]}");
Console.WriteLine("Table Of Contents Collection is ready for use.");
```

```vbnet
textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim tableOfContentsCollection As TableOfContentsCollection = textControl.TablesOfContents
tableOfContentsCollection.Add(New TableOfContents(1, 3) With { .Name = "Contents", .ID = 100 })

Console.WriteLine($"Item: {tableOfContentsCollection.Item(10)}")
Console.WriteLine("Table Of Contents Collection is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TableOfContentsCollection.IsSynchronized Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontentscollection/issynchronized-property/llms-full.txt)
- **Next:** [TableOfContentsCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontentscollection/remove-method/llms-full.txt)
