PropertyDescriptor.GetValue(Object) PropertyDescriptor.GetValue(Object) PropertyDescriptor.GetValue(Object) PropertyDescriptor.GetValue(Object) Method

定義

在衍生類別中覆寫時,取得元件上屬性的目前值。When overridden in a derived class, gets the current value of the property on a component.

public:
 abstract System::Object ^ GetValue(System::Object ^ component);
public abstract object GetValue (object component);
abstract member GetValue : obj -> obj
Public MustOverride Function GetValue (component As Object) As Object

參數

component
Object Object Object Object

具有要為其擷取值之屬性的元件。The component with the property for which to retrieve the value.

傳回

指定元件的屬性值。The value of a property for a given component.

備註

一般來說, 這個方法是透過反映來執行。Typically, this method is implemented through reflection.

這個方法會自動呼叫的前置變更方法OnComponentChanging, 以及的後置變更OnComponentChanged方法IComponentChangeServiceThis method automatically calls the pre-change method, OnComponentChanging, and post-change method, OnComponentChanged, of the IComponentChangeService.

給繼承者的注意事項

當您覆寫這個方法時, 它會叫用您需要執行的 "GetMyProperty" 方法, 以取得屬性的目前值。When you override this method, it gets the current value of the property by invoking a "GetMyProperty" method that you need to implement. 該方法中的例外狀況應通過。An exception in that method should pass through.

適用於