TypeBuilder.GetConstructors(BindingFlags) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an array of ConstructorInfo objects representing the public and non-public constructors defined for this class, as specified.
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()
Parameters
- bindingAttr
- BindingFlags
This must be a bit flag from BindingFlags as in InvokeMethod
, NonPublic
, and so on.
Returns
Returns an array of ConstructorInfo objects representing the specified constructors defined for this class. If no constructors are defined, an empty array is returned.
- Attributes
Exceptions
This method is not implemented for incomplete types.
Remarks
Retrieve the type using Type.GetType or Assembly.GetType and use reflection on the retrieved type.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈