NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

PropertyDescriptor.CanResetValue

When overridden in a derived class, indicates whether resetting the component will change the value of the component.

[Visual Basic]
MustOverride Public Function CanResetValue( _
   ByVal component As Object _
) As Boolean
[C#]
public abstract bool CanResetValue(
   object component
);
[C++]
public: virtual bool CanResetValue(
   Object* component
) = 0;
[JScript]
public abstract function CanResetValue(
   component : Object
) : Boolean;

Parameters

component
The component to test for reset capability.

Return Value

true if resetting the component will change the value of the component; otherwise, false.

Remarks

Typically, this method is implemented through reflection.

Notes to Inheritors: When overridden in a derived class, this method looks for a DefaultValueAttribute. If it finds one, it compares the value of the attribute with the property's current value. It will return true when the default value does not match the property's current value. If this method cannot find a DefaultValueAttribute, it looks for a ShouldPersist XXX method. If it finds a ShouldPersist XXX method, it returns what ShouldPersist XXX returns. If this method cannot find a ShouldPersist XXX method, it looks for a Reset XXX method. If it finds a Reset XXX method, it returns true. If this method cannot find a DefaultValueAttribute, a ShouldPersist XXX method, or a Reset XXX method, then it returns false.

See Also

PropertyDescriptor Class | PropertyDescriptor Members | System.ComponentModel Namespace | PropertyDescriptor