TypeDescriptionProvider.GetReflectionType 方法

定義

對物件執行一般反映。

多載

GetReflectionType(Object)

對指定的物件執行一般反映。

GetReflectionType(Type)

對型別執行一般反映。

GetReflectionType(Type, Object)

對具有特定型別的特定物件執行一般反映。

GetReflectionType(Object)

來源:
TypeDescriptionProvider.cs
來源:
TypeDescriptionProvider.cs
來源:
TypeDescriptionProvider.cs

對指定的物件執行一般反映。

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 的反映類型。

例外狀況

instancenull

備註

方法是 GetReflectionType 方法的較低層級版本 GetTypeDescriptor 。 如果物件無法找到任何自定義類型描述元, GetReflectionType 則會呼叫 以對對物件執行一般反映。

如果您已呼叫使用 實例而非類型的型別描述元成員,請使用這個方法多載。

另請參閱

適用於

GetReflectionType(Type)

來源:
TypeDescriptionProvider.cs
來源:
TypeDescriptionProvider.cs
來源:
TypeDescriptionProvider.cs

對型別執行一般反映。

public:
 Type ^ GetReflectionType(Type ^ objectType);
public Type GetReflectionType (Type objectType);
member this.GetReflectionType : Type -> Type
Public Function GetReflectionType (objectType As Type) As Type

參數

objectType
Type

要為其擷取 IReflect 之物件的型別。

傳回

這個 objectType 的反映類型。

例外狀況

objectTypenull

備註

方法是 GetReflectionType 方法的較低層級版本 GetTypeDescriptor 。 如果物件無法找到任何自定義類型描述元, GetReflectionType 則會呼叫 以對對物件執行一般反映。

如果您已呼叫使用類型而非實例的類型描述元成員,請使用這個方法多載。

另請參閱

適用於

GetReflectionType(Type, Object)

來源:
TypeDescriptionProvider.cs
來源:
TypeDescriptionProvider.cs
來源:
TypeDescriptionProvider.cs

對具有特定型別的特定物件執行一般反映。

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

參數

objectType
Type

要為其擷取 IReflect 之物件的型別。

instance
Object

型別的執行個體。 可以是 null

傳回

這個 objectType 的反映類型。

備註

方法是 GetReflectionType 方法的較低層級版本 GetTypeDescriptor 。 如果物件無法找到任何自定義類型描述元, GetReflectionType 則會呼叫 以對對物件執行一般反映。

給繼承者的注意事項

這個方法的原型為 virtual,而且如果未傳遞父提供者,則預設會 objectType 傳回 。 如果傳遞父提供者,這個方法會叫用 GetReflectionType 父提供者的 方法。

另請參閱

適用於