TypeDescriptionProvider.GetExtendedTypeDescriptor Method (Object)


Gets an extended custom type descriptor for the given object.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

public virtual ICustomTypeDescriptor GetExtendedTypeDescriptor(
	object instance


Type: System.Object

The object for which to get the extended type descriptor.

Return Value

Type: System.ComponentModel.ICustomTypeDescriptor

An ICustomTypeDescriptor that can provide extended metadata for the object.

An extended type descriptor is a custom type descriptor that offers properties that other objects have added to this object, but that are not actually defined on the object. For example, in the .NET Framework component model, objects that implement the IExtenderProvider interface can attach properties to other objects that reside in the same logical container. The overloaded GetTypeDescriptor methods do not return a type descriptor that provides these extra extended properties. The GetExtendedTypeDescriptor method returns the set of these extended properties. The TypeDescriptor will automatically merge the results of these two property collections. While the .NET Framework component model supports only extended properties, GetExtendedTypeDescriptor can be used for extended attributes as well as events, if the type description provider supports it.

GetExtendedTypeDescriptor is virtual and, by default, returns a custom type descriptor that returns empty results if no parent provider was passed. If a parent provider was passed, this method will invoke the parent provider's GetExtendedTypeDescriptor method.

.NET Framework
Available since 2.0
Return to top