ICustomTypeDescriptor.GetProperties 方法

定義

傳回元件之這個執行個體的屬性。

多載

GetProperties()

傳回元件之這個執行個體的屬性。

GetProperties(Attribute[])

使用屬性陣列做為篩選條件,傳回這個元件執行個體的屬性。

GetProperties()

傳回元件之這個執行個體的屬性。

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

傳回

PropertyDescriptorCollection,代表這個元件執行個體的屬性。

備註

這個實例的屬性可能與 類別所提供的屬性集不同。 例如,如果元件已月臺,月臺可以新增或移除其他屬性。

如果未指定任何屬性,實作者可以傳回 PropertyDescriptorCollection.Empty 。 這個方法絕對不應該傳回 null

另請參閱

適用於

GetProperties(Attribute[])

使用屬性陣列做為篩選條件,傳回這個元件執行個體的屬性。

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

參數

attributes
Attribute[]

Attribute 類型陣列,可當做篩選條件使用。

傳回

PropertyDescriptorCollection,代表這個元件執行個體的篩選後屬性。

備註

這個實例的屬性可能與 類別所提供的屬性集不同。 例如,如果元件已月臺,月臺可以新增或移除其他屬性。

如果在陣列中attributes指定 ,Attribute而且屬性沒有該屬性的類別實例,則傳回的集合將會包含 屬性,如果 Attribute 是預設屬性。

如您選取規則,請參閱 GetProperties

另請參閱

適用於