TypeDescriptionProvider.GetTypeDescriptor Method (Type, Object)
.NET Framework (current version)
Gets a custom type descriptor for the given type and object.
Assembly: System (in System.dll)
abstract GetTypeDescriptor : objectType:Type * instance:Object -> ICustomTypeDescriptor override GetTypeDescriptor : objectType:Type * instance:Object -> ICustomTypeDescriptor
Parameters
- objectType
-
Type:
System.Type
The type of object for which to retrieve the type descriptor.
- instance
-
Type:
System.Object
An instance of the type. Can be null if no instance was passed to the TypeDescriptor.
Return Value
Type: System.ComponentModel.ICustomTypeDescriptorAn ICustomTypeDescriptor that can provide metadata for the type.
This method is prototyped as virtual and, by default, returns an empty descriptor if no parent provider was passed. If a parent provider was passed, this method will invoke the parent provider's GetTypeDescriptor method.
Notes to Inheritors:
The GetTypeDescriptor method should return a custom type descriptor for the object. If the method does not provide type information for the object, it should return null.
.NET Framework
Available since 2.0
Available since 2.0
Show: