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
instanceobjectInstance which contains the field. Specify Null, for the static fields.
fieldInfoFieldInfoField info.
defValueTDefault field value (used if field value is null).
Returns
- T
Type Parameters
TType of result.