CustomTypeDescriptor.GetProperties 方法

定義

傳回這個型別描述項所表示之物件的屬性描述項集合。

多載

GetProperties()

傳回這個型別描述項所表示之物件的屬性描述項集合。

GetProperties(Attribute[])

傳回這個型別描述項所表示之物件的已篩選屬性描述項集合。

備註

方法會 GetProperties 傳回這個類型描述元所表示之物件的屬性描述元集合。 您可以提供選擇性的屬性陣列來篩選傳回的集合。 如果未提供父代,方法會傳回 Empty

GetProperties()

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

傳回這個型別描述項所表示之物件的屬性描述項集合。

public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ GetProperties();
public virtual System.ComponentModel.PropertyDescriptorCollection GetProperties ();
abstract member GetProperties : unit -> System.ComponentModel.PropertyDescriptorCollection
override this.GetProperties : unit -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function GetProperties () As PropertyDescriptorCollection

傳回

PropertyDescriptorCollection,包含這個型別描述項所描述之物件的屬性描述項。 預設為 Empty

實作

備註

如果父自定義型別描述元已傳遞至 CustomTypeDescriptor 建構函式,則 GetProperties 方法會呼叫父系的對應方法。

另請參閱

適用於

GetProperties(Attribute[])

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

傳回這個型別描述項所表示之物件的已篩選屬性描述項集合。

public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ GetProperties(cli::array <Attribute ^> ^ attributes);
public virtual System.ComponentModel.PropertyDescriptorCollection GetProperties (Attribute[] attributes);
public virtual System.ComponentModel.PropertyDescriptorCollection GetProperties (Attribute[]? attributes);
abstract member GetProperties : Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
override this.GetProperties : Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function GetProperties (attributes As Attribute()) As PropertyDescriptorCollection

參數

attributes
Attribute[]

當做篩選條件之型別的陣列。 這可以是 null

傳回

PropertyDescriptorCollection,包含這個型別描述項所描述之物件的屬性描述項。 預設為 Empty

實作

備註

您可以使用 attributes 參數來篩選傳回的集合。 如您選取規則,請參閱 GetProperties

如果父自定義型別描述元已傳遞至 CustomTypeDescriptor 建構函式,則 GetProperties 方法會呼叫父系的對應方法。

另請參閱

適用於