Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Spec Namespace / IPdfArrayExt Class / TryAsArray<T> Method
The current array.
OUT: The array of T.
Indicates whether the IPdfNull should be handled as valid value and converted to a null reference (Nothing in Visual Basic).
Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if errors occur.

In This Topic
    TryAsArray<T> Method
    In This Topic
    Tries to convert all elements of this IPdfArray to T, and copies the converted values to a new array of T. Returns true if all elements can be converted to a T or they are PDF Null and allowNulls is true.
    Syntax
    'Declaration
     
    Public Shared Function TryAsArray(Of T As IPdfObject)( _
       ByVal array As IPdfArray, _
       ByRef values() As T, _
       ByVal allowNulls As System.Boolean, _
       ByVal addWarning As System.Boolean _
    ) As System.Boolean
    public static System.bool TryAsArray<T>( 
       IPdfArray array,
       out T[] values,
       System.bool allowNulls,
       System.bool addWarning
    )
    where T: IPdfObject

    Parameters

    array
    The current array.
    values
    OUT: The array of T.
    allowNulls
    Indicates whether the IPdfNull should be handled as valid value and converted to a null reference (Nothing in Visual Basic).
    addWarning
    Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if errors occur.

    Type Parameters

    T

    Return Value

    Returns true if no errors occur.
    See Also