TypeDescriptionProvider.GetReflectionType 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
對物件執行一般反映。
多載
| GetReflectionType(Type) |
對型別執行一般反映。 |
| GetReflectionType(Type, Object) |
針對具有指定型別的指定物件執行一般反映。 |
| GetReflectionType(Object) |
對指定的物件執行一般反映。 |
GetReflectionType(Type)
對型別執行一般反映。
public:
Type ^ GetReflectionType(Type ^ objectType);
public Type GetReflectionType (Type objectType);
member this.GetReflectionType : Type -> Type
Public Function GetReflectionType (objectType As Type) As Type
參數
傳回
這個 objectType的反映類型。
例外狀況
objectType
null。
備註
GetReflectionType 方法是 GetTypeDescriptor 方法的較低層級版本。 如果物件找不到任何自定義型別描述元,則會呼叫 GetReflectionType 對對象執行一般反映。
如果您已呼叫使用類型而非 實例的類型描述項成員,請使用這個方法多載。
另請參閱
適用於
GetReflectionType(Type, Object)
針對具有指定型別的指定物件執行一般反映。
public:
virtual Type ^ GetReflectionType(Type ^ objectType, System::Object ^ instance);
public virtual Type GetReflectionType (Type objectType, object instance);
public virtual Type GetReflectionType (Type objectType, object? instance);
abstract member GetReflectionType : Type * obj -> Type
override this.GetReflectionType : Type * obj -> Type
Public Overridable Function GetReflectionType (objectType As Type, instance As Object) As Type
參數
- instance
- Object
型別的實例。 可以是 null。
傳回
這個 objectType的反映類型。
備註
GetReflectionType 方法是 GetTypeDescriptor 方法的較低層級版本。 如果物件找不到任何自定義型別描述元,則會呼叫 GetReflectionType 對對象執行一般反映。
給繼承者的注意事項
這個方法的原型為 virtual,而且如果未傳遞任何父提供者,則預設會傳回 objectType。 如果傳遞父提供者,這個方法將會叫用父提供者的 GetReflectionType 方法。
另請參閱
適用於
GetReflectionType(Object)
對指定的物件執行一般反映。
public:
Type ^ GetReflectionType(System::Object ^ instance);
public Type GetReflectionType (object instance);
member this.GetReflectionType : obj -> Type
Public Function GetReflectionType (instance As Object) As Type
參數
- instance
- Object
型別的實例(不應 null)。
傳回
這個 instance的反映類型。
例外狀況
instance
null。
備註
GetReflectionType 方法是 GetTypeDescriptor 方法的較低層級版本。 如果物件找不到任何自定義型別描述元,則會呼叫 GetReflectionType 對對象執行一般反映。
如果您已呼叫使用 實例而非型別的類型描述項成員,請使用這個方法多載。