Table of Contents

Struct PdfObjectID

Namespace
PdfSharp.Pdf
Assembly
PdfSharp.dll

Represents a PDF object identifier, a pair of object and generation number.

public readonly struct PdfObjectID : IComparable
Implements
Inherited Members

Constructors

PdfObjectID(int)

Initializes a new instance of the PdfObjectID class.

public PdfObjectID(int objectNumber)

Parameters

objectNumber int

The object number.

PdfObjectID(int, int)

Initializes a new instance of the PdfObjectID class.

public PdfObjectID(int objectNumber, int generationNumber)

Parameters

objectNumber int

The object number.

generationNumber int

The generation number.

Properties

Empty

Creates an empty object identifier.

public static PdfObjectID Empty { get; }

Property Value

PdfObjectID

GenerationNumber

Gets or sets the generation number.

public int GenerationNumber { get; }

Property Value

int

IsEmpty

Indicates whether this object is an empty object identifier.

public bool IsEmpty { get; }

Property Value

bool

ObjectNumber

Gets or sets the object number.

public int ObjectNumber { get; }

Property Value

int

Methods

CompareTo(object?)

Compares the current object ID with another object.

public int CompareTo(object? obj)

Parameters

obj object

Returns

int

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

ToString()

Returns the object and generation numbers as a string.

public override string ToString()

Returns

string

Operators

operator ==(PdfObjectID, PdfObjectID)

Determines whether the two objects are equal.

public static bool operator ==(PdfObjectID left, PdfObjectID right)

Parameters

left PdfObjectID
right PdfObjectID

Returns

bool

operator !=(PdfObjectID, PdfObjectID)

Determines whether the two objects are not equal.

public static bool operator !=(PdfObjectID left, PdfObjectID right)

Parameters

left PdfObjectID
right PdfObjectID

Returns

bool