TypeDelegator.GetConstructors(BindingFlags) 方法

定义

返回 ConstructorInfo 对象的数组,这些对象表示为当前 TypeDelegator 包装的类型定义的构造函数。Returns an array of ConstructorInfo objects representing constructors defined for the type wrapped by the current TypeDelegator.

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[]
Public Overrides Function GetConstructors (bindingAttr As BindingFlags) As ConstructorInfo()

参数

bindingAttr
BindingFlags

影响执行搜索的方式的位掩码。A bitmask that affects the way in which the search is conducted. 该值是零个或多个来自 BindingFlags 的位标志的组合。The value is a combination of zero or more bit flags from BindingFlags.

返回

ConstructorInfo 类型的数组,包含为此类定义的指定的构造函数。An array of type ConstructorInfo containing the specified constructors defined for this class. 如果未定义任何构造函数,则返回一个空数组。If no constructors are defined, an empty array is returned. 根据指定参数的值,只返回公共构造函数或同时返回公共和非公共构造函数。Depending on the value of a specified parameter, only public constructors or both public and non-public constructors will be returned.

属性

注解

类初始值设定项只能通过 GetMemberGetMembersFindMembersGetConstructors来使用。Class initializers are available only through GetMember, GetMembers, FindMembers, and GetConstructors.

适用于