TypeDescriptor.GetReflectionType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a Type that can be used to perform reflection.
Overloads
GetReflectionType(Object) |
Returns a Type that can be used to perform reflection, given an object. |
GetReflectionType(Type) |
Returns a Type that can be used to perform reflection, given a class type. |
GetReflectionType(Object)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
Returns a Type that can be used to perform reflection, given an object.
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
Parameters
- instance
- Object
An instance of the target component.
Returns
A Type for the specified object.
Exceptions
instance
is null
.
Remarks
The GetReflectionType method is a low-level version of the GetTypeDescriptor method. GetReflectionType is typically used to perform standard reflection against an object when no custom type descriptor can be located for it.
See also
Applies to
GetReflectionType(Type)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
Returns a Type that can be used to perform reflection, given a class 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
Parameters
Returns
A Type of the specified class.
Exceptions
type
is null
.
Remarks
The GetReflectionType method is a low-level version of the GetTypeDescriptor method. GetReflectionType is typically used to perform standard reflection against a class when no custom type descriptor can be located for it.