---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/ObjectKey
---

# ObjectKey

## Overview

`ObjectKey` is a struct in Aspose.PDF FOSS for .NET.
Inherits from: `IEquatable`.

Identifies a PDF indirect object by its object number and generation number.

This struct provides 5 methods for working with ObjectKey objects in .NET programs.
Available methods include: `Equals`, `GetHashCode`, `ObjectKey`, `ToString`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `Empty`, `Generation`, `Number`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Number` | `long` | Read | The PDF object number. |
| `Generation` | `long` | Read | The PDF generation number. |
| `Empty` | `ObjectKey` | Read | Default key with both fields set to zero. |

## Methods

| Signature | Description |
|-----------|-------------|
| `ObjectKey(number: long, generation: long)` | Calls ObjectKey on this ObjectKey instance. |
| `Equals(other: ObjectKey)` | Calls Equals on this ObjectKey instance. |
| `Equals(obj: object?)` |  |
| `GetHashCode()` | Calls GetHashCode on this ObjectKey instance. |
| `ToString()` | Calls ToString on this ObjectKey instance. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)