TypeBuilder.GetProperties(BindingFlags) Metod

Definition

Returnerar alla offentliga och icke-offentliga egenskaper som deklarerats eller ärvts av den här typen enligt angiven.

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()

Parametrar

bindingAttr
BindingFlags

Det här anropsattributet. Det måste vara lite flagga från BindingFlags : InvokeMethod, NonPublicoch så vidare.

Returer

Returnerar en matris med PropertyInfo objekt som representerar de offentliga och icke-offentliga egenskaper som definierats för den här typen om nonPublic används. Annars returneras endast de offentliga egenskaperna.

Attribut

Undantag

Den här metoden implementeras inte för ofullständiga typer.

Kommentarer

Hämta typen med eller Type.GetTypeAssembly.GetType och använd reflektion för den hämtade typen.

Gäller för