CollectionConverter.GetPropertiesSupported(ITypeDescriptorContext) 方法

定義

取得值,表示這個物件是否支援屬性。

public:
 override bool GetPropertiesSupported(System::ComponentModel::ITypeDescriptorContext ^ context);
public override bool GetPropertiesSupported (System.ComponentModel.ITypeDescriptorContext context);
override this.GetPropertiesSupported : System.ComponentModel.ITypeDescriptorContext -> bool
Public Overrides Function GetPropertiesSupported (context As ITypeDescriptorContext) As Boolean

參數

context
ITypeDescriptorContext

提供格式內容的 ITypeDescriptorContext

傳回

因為不應該呼叫 GetProperties(ITypeDescriptorContext, Object, Attribute[]) 來尋找這個物件的屬性,所以會是 false。 這個方法永遠不會傳回 true

備註

可以使用 context 參數來擷取環境的其他資訊,而這個轉換子就是從這個環境叫用的。 這可能是 null,所以一定要檢查。 甚至,內容物件上的屬性可能會傳回 null

集合不支援屬性;因此,這個方法一律會傳 false 回 。

適用於

另請參閱