PDFCosArray¶
Namespace: O2S.Components.PDF4NET.Core.Cos
Defines a PDF COS array.
Inheritance Object → PDFCosObject → PDFCosArray
Constructors¶
PDFCosArray()¶
Initializes a new PDFCosArray object.
PDFCosArray(Double[])¶
Initializes a new PDFCosArray object with an array of doubles.
Parameters
items Double[]
Initial array items
Properties¶
Item¶
Property Value
Length¶
Gets the number of elements actually contained in the array.
Property Value
Type¶
Gets the object type.
Property Value
Methods¶
Add(PDFCosObject)¶
Adds an object to the end of the array.
Parameters
item PDFCosObject
The object to be added to the end of the array.
Exceptions
ArgumentNullException
Thrown when the item is null.
AddRange(PDFCosArray)¶
Adds the elements of the specified array to the end of this array.
Parameters
array PDFCosArray
The array whose elements should be added to the end of this array. The array itself cannot be nulland it cannot contain elements that are null.
Exceptions
ArgumentNullException
Thrown when the array is null or when the array contains null elements.
Clear()¶
Removes all elements from the array.
GetElementAsBool(Int32)¶
Gets the element at the specified index as a boolean.
Parameters
index Int32
Index of element to return.
Returns
Boolean
A bool representing the element.
Exceptions
ArgumentOutOfRangeException
Thrown when the index value is invalid
GetElementAsNumber(Int32)¶
Gets the element at the specified index as a double.
Parameters
index Int32
Index of element to return.
Returns
Double
A double representing the element.
Exceptions
ArgumentOutOfRangeException
Thrown when the index value is invalid
GetElementAsString(Int32)¶
Gets the element at the specified index as a string.
Parameters
index Int32
Index of element to return.
Returns
String
A string representing the element.
Exceptions
ArgumentOutOfRangeException
Thrown when the index value is invalid
IndexOf(PDFCosObject)¶
Searches for the specified object and returns the zero-based index of the first occurrence within the entire array.
Parameters
obj PDFCosObject
The object to locate in the array.
Returns
Int32
The zero-based index of the first occurrence of item within the entire array, if found; otherwise, –1.
Insert(Int32, PDFCosObject)¶
Inserts an element into the array at the specified index.
Parameters
index Int32
The zero-based index at which item should be inserted.
item PDFCosObject
The object to insert.
Exceptions
ArgumentNullException
Thrown when the item is null.
Remove(PDFCosObject)¶
Removes the first occurrence of a specific object from the array.
Parameters
obj PDFCosObject
The object to remove from the array.
RemoveAt(Int32)¶
Removes the element at the specified index of the array.
Parameters
index Int32
The zero-based index of the element to remove.
Exceptions
ArgumentOutOfRangeException
Thrown when the index is out of range.
ToString()¶
Returns a String that represents the current Object.
Returns
String
String that represents the current Object.