TypeDescriptor.GetReflectionType 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳 a Type 可用於進行反射。
多載
| 名稱 | Description |
|---|---|
| GetReflectionType(Object) |
回傳 Type 一個可用於在給定物件時進行反射的 a。 |
| GetReflectionType(Type) |
回傳 a Type 可用於在給定類別類型時進行反射。 |
GetReflectionType(Object)
回傳 Type 一個可用於在給定物件時進行反射的 a。
public:
static Type ^ GetReflectionType(System::Object ^ instance);
public static Type GetReflectionType(object instance);
static member GetReflectionType : obj -> Type
Public Shared Function GetReflectionType (instance As Object) As Type
參數
- instance
- Object
目標元件的實例。
傳回
Type A 代表指定的物件。
例外狀況
instance 是 null。
備註
此 GetReflectionType 方法是該方法的 GetTypeDescriptor 低階版本。 GetReflectionType 通常用於在無法找到自訂型別描述符時,對物件進行標準反射。
另請參閱
適用於
GetReflectionType(Type)
回傳 a Type 可用於在給定類別類型時進行反射。
public:
static Type ^ GetReflectionType(Type ^ type);
public static Type GetReflectionType(Type type);
static member GetReflectionType : Type -> Type
Public Shared Function GetReflectionType (type As Type) As Type
參數
傳回
Type A,屬於指定類別。
例外狀況
type 是 null。
備註
此 GetReflectionType 方法是該方法的 GetTypeDescriptor 低階版本。 GetReflectionType 通常用於在無法找到自訂型別描述符時,對類別進行標準反射。