CustomTypeDescriptor Constructors

Definition

Initializes a new instance of the CustomTypeDescriptor class.

Overloads

CustomTypeDescriptor()

Initializes a new instance of the CustomTypeDescriptor class.

CustomTypeDescriptor(ICustomTypeDescriptor)

Initializes a new instance of the CustomTypeDescriptor class using a parent custom type descriptor.

CustomTypeDescriptor()

Initializes a new instance of the CustomTypeDescriptor class.

protected:
 CustomTypeDescriptor();
protected CustomTypeDescriptor ();
Protected Sub New ()

Remarks

This constructor is equivalent to calling the other CustomTypeDescriptor.CustomTypeDescriptor constructor with a parameter that is null.

All methods of a CustomTypeDescriptor created with this constructor will return default values.

See also

CustomTypeDescriptor(ICustomTypeDescriptor)

Initializes a new instance of the CustomTypeDescriptor class using a parent custom type descriptor.

protected:
 CustomTypeDescriptor(System::ComponentModel::ICustomTypeDescriptor ^ parent);
protected CustomTypeDescriptor (System.ComponentModel.ICustomTypeDescriptor parent);
new System.ComponentModel.CustomTypeDescriptor : System.ComponentModel.ICustomTypeDescriptor -> System.ComponentModel.CustomTypeDescriptor
Protected Sub New (parent As ICustomTypeDescriptor)

Parameters

parent
ICustomTypeDescriptor

The parent custom type descriptor.

Remarks

If the parent parameter is null, all CustomTypeDescriptor methods will return default values. Otherwise, all CustomTypeDescriptor methods will delegate to the methods of parent.

Most CustomTypeDescriptor methods return null by default. The following table shows the return values for the methods that do not return null by default.

Method Default return value
GetAttributes An empty attribute collection (AttributeCollection.Empty).
GetConverter The default TypeConverter instance.
GetEvents An empty events collection (EventDescriptorCollection.Empty).
GetProperties An empty property collection (PropertyDescriptorCollection.Empty).

See also

Applies to