# NumberTree Class

> The number tree is a common data structure in PDF files.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/NumberTree
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class NumberTree : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## Description

The number tree is a common data structure in PDF files.

The number tree is a type of dictionary that can store many more pairs of matched records than a standard object dictionary.

A number tree uses keys that are integers to map to data objects, sorted in ascending numerical order.

**Referenced by:** [`Document`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Document.md)

**Uses types:** [`Document`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Document.md), [`PDFDict`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/PDFDict.md), [`PDFObject`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/PDFObject.md)

## Constructors

### NumberTree

```csharp
Datalogics.PDFL.NumberTree.NumberTree(Document doc)
```

*constructor*

**Parameters**

- `doc` ([`Document`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Document.md)): The Document in which to create the NumberTree.

Creates a new, empty NumberTree in the specified Document.

## Properties

### PDFDict

```csharp
PDFDict Datalogics.PDFL.NumberTree.PDFDict { get; }
```

Gets the underlying PDFDict of this NumberTree.

## Methods

### Dispose

```csharp
void Datalogics.PDFL.NumberTree.Dispose()
```

**Returns:** `void`

### Equals

```csharp
override bool Datalogics.PDFL.NumberTree.Equals(object obj)
```

**Parameters**

- `obj` (`object`)

**Returns:** `override bool`

### Get

```csharp
PDFObject Datalogics.PDFL.NumberTree.Get(int key)
```

**Parameters**

- `key` (`int`): The integer key of the PDFObject to get from the tree.

**Returns:** [`PDFObject`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/PDFObject.md)

The PDFObject value corresponding to the supplied key.

Retrieves an entry from this NumberTree.

### Put

```csharp
void Datalogics.PDFL.NumberTree.Put(int key, PDFObject value)
```

**Parameters**

- `key` (`int`): The integer of the PDFObject to put in the tree.
- `value` ([`PDFObject`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/PDFObject.md)): The PDFObject to be associated with key.

**Returns:** `void`

Puts a new entry in this NumberTree. If an entry with this name is already in the tree, it is replaced.

### Remove

```csharp
void Datalogics.PDFL.NumberTree.Remove(int key)
```

**Parameters**

- `key` (`int`): The integer of the PDFObject to remove from the tree.

**Returns:** `void`

Removes the specified PDFObject from this NumberTree. It does nothing if no PDFObject of that number exists in this NumberTree.
