Table of Contents

Class PdfArray.ArrayElements

Namespace
PdfSharp.Pdf
Assembly
PdfSharp.dll

Represents the elements of an PdfArray.

public sealed class PdfArray.ArrayElements : IList<PdfItem>, ICollection<PdfItem>, IEnumerable<PdfItem>, IEnumerable, ICloneable
Inheritance
PdfArray.ArrayElements
Implements
Inherited Members

Properties

Count

Gets the number of elements in the array.

public int Count { get; }

Property Value

int

IsFixedSize

Returns false.

public bool IsFixedSize { get; }

Property Value

bool

IsReadOnly

Returns false.

public bool IsReadOnly { get; }

Property Value

bool

IsSynchronized

Returns false.

public bool IsSynchronized { get; }

Property Value

bool

this[int]

Gets or sets an item at the specified index.

public PdfItem this[int index] { get; set; }

Parameters

index int

Property Value

PdfItem

Items

Gets all items of this array.

public PdfItem[] Items { get; }

Property Value

PdfItem[]

SyncRoot

The current implementation return null.

public object SyncRoot { get; }

Property Value

object

Methods

Add(PdfItem)

Appends the specified object to the array.

public void Add(PdfItem value)

Parameters

value PdfItem

Clear()

Removes all items from the array.

public void Clear()

Clone()

Creates a shallow copy of this object.

public PdfArray.ArrayElements Clone()

Returns

PdfArray.ArrayElements

Contains(PdfItem)

Determines whether the specified value is in the array.

public bool Contains(PdfItem value)

Parameters

value PdfItem

Returns

bool

CopyTo(PdfItem[], int)

Copies the elements of the array to the specified array.

public void CopyTo(PdfItem[] array, int index)

Parameters

array PdfItem[]
index int

GetArray(int)

Gets the PdfArray with the specified index, or null if no such object exists. If the index refers to a reference, the referenced PdfArray is returned.

public PdfArray? GetArray(int index)

Parameters

index int

Returns

PdfArray

GetBoolean(int)

Converts the specified value to boolean. If the value does not exist, the function returns false. If the value is not convertible, the function throws an InvalidCastException. If the index is out of range, the function throws an ArgumentOutOfRangeException.

public bool GetBoolean(int index)

Parameters

index int

Returns

bool

GetDictionary(int)

Gets the PdfArray with the specified index, or null if no such object exists. If the index refers to a reference, the referenced PdfArray is returned.

public PdfDictionary? GetDictionary(int index)

Parameters

index int

Returns

PdfDictionary

GetEnumerator()

Returns an enumerator that iterates through the array.

public IEnumerator<PdfItem> GetEnumerator()

Returns

IEnumerator<PdfItem>

GetInteger(int)

Converts the specified value to integer. If the value does not exist, the function returns 0. If the value is not convertible, the function throws an InvalidCastException. If the index is out of range, the function throws an ArgumentOutOfRangeException.

public int GetInteger(int index)

Parameters

index int

Returns

int

GetName(int)

Converts the specified value to a name. If the value does not exist, the function returns the empty string. If the value is not convertible, the function throws an InvalidCastException. If the index is out of range, the function throws an ArgumentOutOfRangeException.

public string GetName(int index)

Parameters

index int

Returns

string

GetNullableReal(int)

Converts the specified value to double?. If the value does not exist, the function returns null. If the value is not convertible, the function throws an InvalidCastException. If the index is out of range, the function throws an ArgumentOutOfRangeException.

public double? GetNullableReal(int index)

Parameters

index int

Returns

double?

GetObject(int)

Gets the PdfObject with the specified index, or null if no such object exists. If the index refers to a reference, the referenced PdfObject is returned.

public PdfObject? GetObject(int index)

Parameters

index int

Returns

PdfObject

GetReal(int)

Converts the specified value to double. If the value does not exist, the function returns 0. If the value is not convertible, the function throws an InvalidCastException. If the index is out of range, the function throws an ArgumentOutOfRangeException.

public double GetReal(int index)

Parameters

index int

Returns

double

GetReference(int)

Gets the PdfReference with the specified index, or null if no such object exists.

public PdfReference? GetReference(int index)

Parameters

index int

Returns

PdfReference

GetString(int)

Converts the specified value to string. If the value does not exist, the function returns the empty string. If the value is not convertible, the function throws an InvalidCastException. If the index is out of range, the function throws an ArgumentOutOfRangeException.

public string GetString(int index)

Parameters

index int

Returns

string

IndexOf(PdfItem)

Gets the index of the specified item.

public int IndexOf(PdfItem value)

Parameters

value PdfItem

Returns

int

Insert(int, PdfItem)

Inserts the item the specified index.

public void Insert(int index, PdfItem value)

Parameters

index int
value PdfItem

Remove(PdfItem)

Removes the first occurrence of a specific object from the array/>.

public bool Remove(PdfItem item)

Parameters

item PdfItem

Returns

bool

RemoveAt(int)

Removes the item at the specified index.

public void RemoveAt(int index)

Parameters

index int