CustomTypeDescriptor.GetProperties 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回這個型別描述項所表示之物件的屬性描述項集合。
GetProperties() |
傳回這個型別描述項所表示之物件的屬性描述項集合。 |
GetProperties(Attribute[]) |
傳回這個型別描述項所表示之物件的已篩選屬性描述項集合。 |
方法會 GetProperties 傳回這個類型描述元所表示之物件的屬性描述元集合。 您可以提供選擇性的屬性陣列來篩選傳回的集合。 如果未提供父代,方法會傳回 Empty。
傳回這個型別描述項所表示之物件的屬性描述項集合。
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 方法會呼叫父系的對應方法。
另請參閱
適用於
.NET 9 和其他版本
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
傳回這個型別描述項所表示之物件的已篩選屬性描述項集合。
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 方法會呼叫父系的對應方法。
另請參閱
- GetProperties(Object, Attribute[])
- GetProperties
- PropertyDescriptorCollection
- GetEvents
- GetAttributes()
- GetDefaultProperty()
適用於
.NET 9 和其他版本
產品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |