EnumBuilder.GetConstructors(BindingFlags) Metoda

Definicja

Zwraca tablicę ConstructorInfo obiektów reprezentujących konstruktory publiczne i inne niż publiczne zdefiniowane dla tej klasy zgodnie z opisem.

public:
 override cli::array <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);
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()

Parametry

bindingAttr
BindingFlags

Musi to być nieco flaga z BindingFlags : InvokeMethod, NonPublici tak dalej.

Zwraca

Zwraca tablicę ConstructorInfo obiektów reprezentujących określone konstruktory zdefiniowane dla tej klasy. Jeśli nie zdefiniowano żadnych konstruktorów, zwracana jest pusta tablica.

Atrybuty

Wyjątki

Ta metoda nie jest obecnie obsługiwana w typach, które nie są kompletne.

Uwagi

Aby obejść ten problem, aby pobrać konstruktor gotowego typu, możesz pobrać typ przy użyciu metody Type.GetType lub Assembly.GetType i użyć odbicia dla pobranego typu.

Dotyczy