TypeBuilder.GetProperties(BindingFlags) 方法

定義

回傳所有由此類型宣告或繼承的公共及非公共財產,依規定而定。

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

這個召喚屬性。 這應該是來自 BindingFlagsInvokeMethodNonPublic, 等的 flag。

傳回

如果PropertyInfo使用 ,會回傳代表此類型中定義的公開與非公開屬性的物件陣列nonPublic;否則,僅回傳公開屬性。

屬性

例外狀況

此方法未用於不完整型別。

備註

使用 Type.GetTypeAssembly.GetType 來檢索該型別,並對檢索型別使用反射。

適用於