TypeBuilder.GetConstructors(BindingFlags) Metódus

Definíció

Az osztályhoz definiált nyilvános és nem nyilvános konstruktorokat képviselő objektumtömböt ConstructorInfo ad vissza a megadott módon.

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

Paraméterek

bindingAttr
BindingFlags

Ennek egy kis jelölőnek kell lennie a következőtől BindingFlagsInvokeMethodkezdveNonPublic, és így tovább.

Válaszok

Az osztályhoz definiált konstruktorokat képviselő objektumtömböt ConstructorInfo ad vissza. Ha nincs konstruktor definiálva, a rendszer üres tömböt ad vissza.

Attribútumok

Kivételek

Ez a metódus nem hiányos típusok esetén van implementálva.

Megjegyzések

Kérje le a típust a lekért típussal Type.GetType , vagy Assembly.GetType használja a visszaverődést a beolvasott típuson.

A következőre érvényes: