EnumBuilder.GetConstructors(BindingFlags) Metodo

Definizione

Restituisce una matrice di ConstructorInfo oggetti che rappresentano i costruttori pubblici e non pubblici definiti per questa classe, come specificato.

public:
 override cli::array <System::Reflection::ConstructorInfo ^> ^ GetConstructors(System::Reflection::BindingFlags bindingAttr);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)]
public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr);
public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr);
[System.Runtime.InteropServices.ComVisible(true)]
public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr);
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)>]
override this.GetConstructors : System.Reflection.BindingFlags -> System.Reflection.ConstructorInfo[]
override this.GetConstructors : System.Reflection.BindingFlags -> System.Reflection.ConstructorInfo[]
[<System.Runtime.InteropServices.ComVisible(true)>]
override this.GetConstructors : System.Reflection.BindingFlags -> System.Reflection.ConstructorInfo[]
Public Overrides Function GetConstructors (bindingAttr As BindingFlags) As ConstructorInfo()

Parametri

bindingAttr
BindingFlags

Deve essere un flag di bit da BindingFlags : InvokeMethod, NonPublice così via.

Valori restituiti

Restituisce una matrice di ConstructorInfo oggetti che rappresentano i costruttori specificati definiti per questa classe. Se non vengono definiti costruttori, viene restituita una matrice vuota.

Attributi

Eccezioni

Questo metodo non è attualmente supportato nei tipi non completi.

Commenti

Come soluzione alternativa, per recuperare il costruttore di un tipo finito, è possibile recuperare il tipo usando Type.GetType o Assembly.GetType e usare la reflection sul tipo recuperato.

Si applica a