Method GetFieldValue
GetFieldValue<T>(object?, FieldInfo, T)
Gets field value using the specified object instance and field info.
public static T GetFieldValue<T>(object? instance, FieldInfo fieldInfo, T defValue)
Parameters
instance
objectInstance which contains the field. Specify Null, for the static fields.
fieldInfo
FieldInfoField info.
defValue
TDefault field value (used if field value is null).
Returns
- T
Type Parameters
T
Type of result.