TypeBuilder.GetProperties(BindingFlags) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳所有由此類型宣告或繼承的公共及非公共財產,依規定而定。
public:
override cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties(System::Reflection::BindingFlags bindingAttr);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)]
public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr);
public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr);
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicProperties | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)>]
override this.GetProperties : System.Reflection.BindingFlags -> System.Reflection.PropertyInfo[]
override this.GetProperties : System.Reflection.BindingFlags -> System.Reflection.PropertyInfo[]
Public Overrides Function GetProperties (bindingAttr As BindingFlags) As PropertyInfo()
參數
- bindingAttr
- BindingFlags
這個召喚屬性。 這應該是來自 BindingFlags : InvokeMethod, NonPublic, 等的 flag。
傳回
如果PropertyInfo使用 ,會回傳代表此類型中定義的公開與非公開屬性的物件陣列nonPublic;否則,僅回傳公開屬性。
- 屬性
例外狀況
此方法未用於不完整型別。
備註
使用 Type.GetType 或 Assembly.GetType 來檢索該型別,並對檢索型別使用反射。