[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Spec.IPdfArrayExt.GetEnum

GetEnum Method

GetEnum<T>(IPdfArray, int, T?)

Gets the nullable enum value at the specified index. If the value does not exist or cannot be converted to an enum, returns defValue (which can be null).

Declaration
public static T? GetEnum<T>(this IPdfArray array, int index, T? defValue) where T : struct
Parameters
Type Name Description
IPdfArray array

The current array.

int index

The value index.

T? defValue

The default value.

Returns
Type Description
T?

The value at the specified index, or defValue.

Type Parameters
Name Description
T

GetEnum<T>(IPdfArray, int, T)

Gets the enum value at the specified index. If the value does not exist or cannot be converted to an enum, returns defValue.

Declaration
public static T GetEnum<T>(this IPdfArray array, int index, T defValue) where T : struct
Parameters
Type Name Description
IPdfArray array

The current array.

int index

The value index.

T defValue

The default value.

Returns
Type Description
T

The value at the specified index, or defValue.

Type Parameters
Name Description
T