EnumBuilder.GetProperties(BindingFlags) 方法

定義

依指定傳回這個類型所宣告或繼承的所有公用和非公用屬性。

public:
 override cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties(System::Reflection::BindingFlags bindingAttr);
public override System.Reflection.PropertyInfo[] GetProperties (System.Reflection.BindingFlags bindingAttr);
override this.GetProperties : System.Reflection.BindingFlags -> System.Reflection.PropertyInfo[]
Public Overrides Function GetProperties (bindingAttr As BindingFlags) As PropertyInfo()

參數

bindingAttr
BindingFlags

這個引動過程屬性。 必須是來自 BindingFlags 的位元旗標:InvokeMethodNonPublic 等。

傳回

傳回 PropertyInfo 物件的陣列,如果使用了 nonPublic,則會代表這個類型上定義的公用和非公用屬性;否則只會傳回公用屬性。

例外狀況

不完整的類型目前不支援這個方法。

備註

因應措施是,若要擷取已完成類型的屬性,請使用 Type.GetType 或使用 Assembly.GetType 擷取型別上的反映來擷取類型。

適用於