[]
Tries to get the value at the specified index.
Returns true if value exists and can be converted to a T,
resolves a PDF reference if needed.
Note! The method does not resolve reference if T is IPdfRef,
otherwise the method resolves the reference and returns actual object.
public static bool TryGet<T>(this IPdfArray array, int index, out T value, out bool isNull, bool addWarning) where T : IPdfObject
Public Shared Function TryGet(Of T As IPdfObject)(array As IPdfArray, index As Integer, ByRef value As T, ByRef isNull As Boolean, addWarning As Boolean) As Boolean
| Type | Name | Description |
|---|---|---|
| IPdfArray | array | The current array. |
| int | index | The index of the value to get. |
| T | value | OUT: The value. |
| bool | isNull | OUT: Indicates whether the value is PDF null. |
| bool | addWarning | Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if errors occur. |
| Type | Description |
|---|---|
| bool | Returns true if no errors occur. |
| Name | Description |
|---|---|
| T |
Tries to get the value at the specified index.
Note! This method returns IPdfRef if T is IPdfRef,
otherwise the method resolves the reference and returns actual object.
public static bool TryGet<T>(this IPdfArray array, int index, out T value, bool addWarning = true) where T : IPdfObject
Public Shared Function TryGet(Of T As IPdfObject)(array As IPdfArray, index As Integer, ByRef value As T, Optional addWarning As Boolean = True) As Boolean
| Type | Name | Description |
|---|---|---|
| IPdfArray | array | The current array. |
| int | index | The index of the value to get. |
| T | value | OUT: The value at specified index. |
| bool | addWarning | Indicates whether to add a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog
if value at the specified index can't be converted to the |
| Type | Description |
|---|---|
| bool | true if successful; false otherwise. |
| Name | Description |
|---|---|
| T |