Class PdfArray.ArrayElements
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
IsFixedSize
Returns false.
public bool IsFixedSize { get; }
Property Value
IsReadOnly
Returns false.
public bool IsReadOnly { get; }
Property Value
IsSynchronized
Returns false.
public bool IsSynchronized { get; }
Property Value
this[int]
Gets or sets an item at the specified index.
public PdfItem this[int index] { get; set; }
Parameters
index
int
Property Value
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
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
Contains(PdfItem)
Determines whether the specified value is in the array.
public bool Contains(PdfItem value)
Parameters
value
PdfItem
Returns
CopyTo(PdfItem[], int)
Copies the elements of the array to the specified array.
public void CopyTo(PdfItem[] array, int index)
Parameters
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
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
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
GetEnumerator()
Returns an enumerator that iterates through the array.
public IEnumerator<PdfItem> GetEnumerator()
Returns
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
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
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
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
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
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
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
IndexOf(PdfItem)
Gets the index of the specified item.
public int IndexOf(PdfItem value)
Parameters
value
PdfItem
Returns
Insert(int, PdfItem)
Inserts the item the specified index.
public void Insert(int index, PdfItem value)
Parameters
Remove(PdfItem)
Removes the first occurrence of a specific object from the array/>.
public bool Remove(PdfItem item)
Parameters
item
PdfItem
Returns
RemoveAt(int)
Removes the item at the specified index.
public void RemoveAt(int index)
Parameters
index
int