TypeConverter.SimplePropertyDescriptor.CanResetValue(Object) 메서드

정의

구성 요소를 다시 설정하면 해당 구성 요소의 값이 변경되는지 여부를 반환합니다.

public:
 override bool CanResetValue(System::Object ^ component);
public override bool CanResetValue (object component);
override this.CanResetValue : obj -> bool
Public Overrides Function CanResetValue (component As Object) As Boolean

매개 변수

component
Object

다시 설정 기능을 테스트할 구성 요소입니다.

반환

구성 요소를 다시 설정하면 해당 구성 요소의 값이 변경되는 경우 true이고, 그렇지 않으면 false입니다.

설명

이 메서드는 을 찾습니다 DefaultValueAttribute. 이 값을 찾으면 특성의 값을 속성의 현재 값과 비교합니다. 기본값이 속성의 현재 값과 일치하지 않으면 를 반환 true 합니다. 이 메서드가 를 DefaultValueAttribute찾을 수 없는 경우 메서드를 찾습니다 ShouldSerializeMyProperty . 메서드를 ShouldSerializeMyProperty 찾으면 반환되는 항목을 ShouldSerializeMyProperty 반환합니다. 이 메서드가 메서드를 ShouldSerializeMyProperty 찾을 수 없는 경우 메서드를 찾습니다 ResetMyProperty . 메서드를 찾으면 를 ResetMyProperty 반환합니다 true. 이 메서드가 , 메서드 또는 ResetMyProperty 메서드를 ShouldSerializeMyProperty 찾을 DefaultValueAttribute수 없는 경우 를 반환합니다false.

적용 대상

추가 정보