[]
Gets the nullable enum value associated with the specified key.
If the value does not exist or cannot be converted to an enum,
returns defValue
(which can be null).
public static T? GetEnum<T>(this IPdfDict dict, PdfName key, T? defValue) where T : struct
Public Shared Function GetEnum(Of T As Structure)(dict As IPdfDict, key As PdfName, defValue As T?) As T?
Type | Name | Description |
---|---|---|
IPdfDict | dict | The current dictionary. |
PdfName | key | The key identifying the value. |
T? | defValue | The default value. |
Type | Description |
---|---|
T? | The value associated with the specified key, or |
Name | Description |
---|---|
T |
Gets the enum value associated with the specified key.
If the value does not exist or cannot be converted to an enum,
returns defValue
.
public static T GetEnum<T>(this IPdfDict dict, PdfName key, T defValue) where T : struct
Public Shared Function GetEnum(Of T As Structure)(dict As IPdfDict, key As PdfName, defValue As T) As T
Type | Name | Description |
---|---|---|
IPdfDict | dict | The current dictionary. |
PdfName | key | The key identifying the value. |
T | defValue | The default value. |
Type | Description |
---|---|
T | The value associated with the specified key, or |
Name | Description |
---|---|
T |