Method ResetProperty
ResetProperty(object?, PropertyInfo?)
Resets property value using the specified instance and property info. Uses different methods to reset the property including: calling reset method, assigning default value from the attribute, assigning null value if property is nullable.
public static bool ResetProperty(object? instance, PropertyInfo? propInfo)
Parameters
instance
objectObject instance with the property.
propInfo
PropertyInfoProperty info.
Returns
- bool
True if property was reset.