CustomTypeDescriptor 建構函式

定義

初始化 CustomTypeDescriptor 類別的新執行個體。

多載

CustomTypeDescriptor()

初始化 CustomTypeDescriptor 類別的新執行個體。

CustomTypeDescriptor(ICustomTypeDescriptor)

使用父自訂型別描述項,初始化 CustomTypeDescriptor 類別的新執行個體。

CustomTypeDescriptor()

來源:
CustomTypeDescriptor.cs
來源:
CustomTypeDescriptor.cs
來源:
CustomTypeDescriptor.cs

初始化 CustomTypeDescriptor 類別的新執行個體。

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

備註

這個建構函式相當於使用 null參數呼叫其他CustomTypeDescriptor.CustomTypeDescriptor建構函式。

使用此建構函式建立之 CustomTypeDescriptor 的所有方法都會傳回預設值。

另請參閱

適用於

CustomTypeDescriptor(ICustomTypeDescriptor)

來源:
CustomTypeDescriptor.cs
來源:
CustomTypeDescriptor.cs
來源:
CustomTypeDescriptor.cs

使用父自訂型別描述項,初始化 CustomTypeDescriptor 類別的新執行個體。

protected:
 CustomTypeDescriptor(System::ComponentModel::ICustomTypeDescriptor ^ parent);
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)

參數

parent
ICustomTypeDescriptor

父自訂型別描述項。

備註

parent如果 參數為 null,則所有CustomTypeDescriptor方法都會傳回預設值。 否則,所有 CustomTypeDescriptor 方法都會委派給 的方法 parent

根據預設,大部分 CustomTypeDescriptor 的方法都會傳回 null 。 下表顯示預設不會傳回之方法的傳回 null 值。

方法 默認傳回值
GetAttributes 空的屬性集合 (AttributeCollection.Empty) 。
GetConverter 默認 TypeConverter 實例。
GetEvents 空的事件集合 (EventDescriptorCollection.Empty) 。
GetProperties 空的屬性集合 (PropertyDescriptorCollection.Empty) 。

另請參閱

適用於